Blame include/internal/catch_common.cpp

rpm-build a7f80b
/*
rpm-build a7f80b
 *  Created by Phil on 27/11/2013.
rpm-build a7f80b
 *  Copyright 2013 Two Blue Cubes Ltd. All rights reserved.
rpm-build a7f80b
 *
rpm-build a7f80b
 *  Distributed under the Boost Software License, Version 1.0. (See accompanying
rpm-build a7f80b
 *  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
rpm-build a7f80b
 */
rpm-build a7f80b
rpm-build a7f80b
#include "catch_common.h"
rpm-build a7f80b
#include "catch_context.h"
rpm-build a7f80b
#include "catch_interfaces_config.h"
rpm-build a7f80b
rpm-build a7f80b
#include <cstring>
rpm-build a7f80b
#include <ostream>
rpm-build a7f80b
rpm-build a7f80b
namespace Catch {
rpm-build a7f80b
rpm-build a7f80b
    bool SourceLineInfo::empty() const noexcept {
rpm-build a7f80b
        return file[0] == '\0';
rpm-build a7f80b
    }
rpm-build a7f80b
    bool SourceLineInfo::operator == ( SourceLineInfo const& other ) const noexcept {
rpm-build a7f80b
        return line == other.line && (file == other.file || std::strcmp(file, other.file) == 0);
rpm-build a7f80b
    }
rpm-build a7f80b
    bool SourceLineInfo::operator < ( SourceLineInfo const& other ) const noexcept {
rpm-build a7f80b
        return line < other.line || ( line == other.line && (std::strcmp(file, other.file) < 0));
rpm-build a7f80b
    }
rpm-build a7f80b
rpm-build a7f80b
    std::ostream& operator << ( std::ostream& os, SourceLineInfo const& info ) {
rpm-build a7f80b
#ifndef __GNUG__
rpm-build a7f80b
        os << info.file << '(' << info.line << ')';
rpm-build a7f80b
#else
rpm-build a7f80b
        os << info.file << ':' << info.line;
rpm-build a7f80b
#endif
rpm-build a7f80b
        return os;
rpm-build a7f80b
    }
rpm-build a7f80b
rpm-build a7f80b
    std::string StreamEndStop::operator+() const {
rpm-build a7f80b
        return std::string();
rpm-build a7f80b
    }
rpm-build a7f80b
rpm-build a7f80b
    NonCopyable::NonCopyable() = default;
rpm-build a7f80b
    NonCopyable::~NonCopyable() = default;
rpm-build a7f80b
rpm-build a7f80b
}