Wire Sysio
Wire Sysion 1.0.0
Loading...
Searching...
No Matches
catch_common.cpp
Go to the documentation of this file.
1
/*
2
* Created by Phil on 27/11/2013.
3
* Copyright 2013 Two Blue Cubes Ltd. All rights reserved.
4
*
5
* Distributed under the Boost Software License, Version 1.0. (See accompanying
6
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7
*/
8
9
#include "
catch_common.h
"
10
#include "
catch_context.h
"
11
#include "
catch_interfaces_config.h
"
12
13
#include <cstring>
14
#include <ostream>
15
16
namespace
Catch
{
17
18
bool
SourceLineInfo::empty
() const noexcept {
19
return
file[0] ==
'\0'
;
20
}
21
bool
SourceLineInfo::operator ==
(
SourceLineInfo
const
& other )
const
noexcept
{
22
return
line == other.line && (file == other.file || std::strcmp(file, other.file) == 0);
23
}
24
bool
SourceLineInfo::operator <
(
SourceLineInfo
const
& other )
const
noexcept
{
25
// We can assume that the same file will usually have the same pointer.
26
// Thus, if the pointers are the same, there is no point in calling the strcmp
27
return
line < other.line || ( line == other.line && file != other.file && (std::strcmp(file, other.file) < 0));
28
}
29
30
std::ostream&
operator <<
( std::ostream&
os
,
SourceLineInfo
const
& info ) {
31
#ifndef __GNUG__
32
os
<< info.file <<
'('
<< info.line <<
')'
;
33
#else
34
os
<< info.file <<
':'
<< info.line;
35
#endif
36
return
os
;
37
}
38
39
std::string
StreamEndStop::operator+
()
const
{
40
return
std::string();
41
}
42
43
NonCopyable::NonCopyable
() =
default
;
44
NonCopyable::~NonCopyable
() =
default
;
45
46
}
catch_common.h
catch_context.h
catch_interfaces_config.h
Catch::NonCopyable::~NonCopyable
virtual ~NonCopyable()
Catch::NonCopyable::NonCopyable
NonCopyable()
os
os_t os
Definition
environment.hpp:23
Catch
Definition
231-Cfg-OutputStreams.cpp:32
Catch::operator<<
auto operator<<(std::ostream &os, LazyExpression const &lazyExpr) -> std::ostream &
Definition
catch_assertionhandler.cpp:38
Catch::SourceLineInfo
Definition
catch.hpp:417
Catch::SourceLineInfo::empty
bool empty() const noexcept
Definition
catch_common.cpp:18
Catch::SourceLineInfo::operator==
bool operator==(SourceLineInfo const &other) const noexcept
Definition
catch_common.cpp:21
Catch::SourceLineInfo::operator<
bool operator<(SourceLineInfo const &other) const noexcept
Definition
catch_common.cpp:24
Catch::StreamEndStop::operator+
std::string operator+() const
Definition
catch_common.cpp:39
libraries
sys-vm
external
Catch2
include
internal
catch_common.cpp
Generated by
1.12.0