Split MessageInfo into its own header
This is first step towards splitting apart reporter implementation and `catch_string.hpp`.
This commit is contained in:
9 files changed
+64
-39
No files matched your search
@@ -0,0 +1,26 @@
|
||||
|
||||
#include <catch2/internal/catch_message_info.hpp>
|
||||
|
||||
namespace Catch {
|
||||
|
||||
MessageInfo::MessageInfo( StringRef const& _macroName,
|
||||
SourceLineInfo const& _lineInfo,
|
||||
ResultWas::OfType _type )
|
||||
: macroName( _macroName ),
|
||||
lineInfo( _lineInfo ),
|
||||
type( _type ),
|
||||
sequence( ++globalCount )
|
||||
{}
|
||||
|
||||
bool MessageInfo::operator==( MessageInfo const& other ) const {
|
||||
return sequence == other.sequence;
|
||||
}
|
||||
|
||||
bool MessageInfo::operator<( MessageInfo const& other ) const {
|
||||
return sequence < other.sequence;
|
||||
}
|
||||
|
||||
// This may need protecting if threading support is added
|
||||
unsigned int MessageInfo::globalCount = 0;
|
||||
|
||||
} // end namespace Catch
|
||||
Reference in new issue
Block a user