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 
empty() const18     bool SourceLineInfo::empty() const noexcept {
19         return file[0] == '\0';
20     }
operator ==(SourceLineInfo const & other) const21     bool SourceLineInfo::operator == ( SourceLineInfo const& other ) const noexcept {
22         return line == other.line && (file == other.file || std::strcmp(file, other.file) == 0);
23     }
operator <(SourceLineInfo const & other) const24     bool SourceLineInfo::operator < ( SourceLineInfo const& other ) const noexcept {
25         return line < other.line || ( line == other.line && (std::strcmp(file, other.file) < 0));
26     }
27 
operator <<(std::ostream & os,SourceLineInfo const & info)28     std::ostream& operator << ( std::ostream& os, SourceLineInfo const& info ) {
29 #ifndef __GNUG__
30         os << info.file << '(' << info.line << ')';
31 #else
32         os << info.file << ':' << info.line;
33 #endif
34         return os;
35     }
36 
operator +() const37     std::string StreamEndStop::operator+() const {
38         return std::string();
39     }
40 
41     NonCopyable::NonCopyable() = default;
42     NonCopyable::~NonCopyable() = default;
43 
44 }
45