catch2/tests/ExtraTests/X10-FallbackStringifier.cpp

31 lines
628 B
C++
Raw Normal View History

// Copyright Catch2 Authors
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// https://www.boost.org/LICENSE_1_0.txt)
// SPDX-License-Identifier: BSL-1.0
// X10-FallbackStringifier.cpp
// Test that defining fallbackStringifier compiles
#include <string>
// A catch-all stringifier
template <typename T>
std::string fallbackStringifier(T const&) {
return "{ !!! }";
}
2020-01-21 15:03:07 +01:00
#include <catch2/catch_test_macros.hpp>
struct foo {
explicit operator bool() const {
return true;
}
};
TEST_CASE("aa") {
REQUIRE(foo{});
}