diff options
| author | Martin Hořeňovský | 2017-06-05 17:19:42 +0200 |
|---|---|---|
| committer | Martin Hořeňovský | 2017-06-05 17:19:42 +0200 |
| commit | 7f6773bb4d4bcdb7858e63f906e8a80e746bea7e (patch) | |
| tree | 947fb02bfb2c860cffd6b08c29b461f17bf3c64d /projects | |
| parent | b459bb4c431670cb3031a68f4b3cf79f631d0c48 (diff) | |
| parent | 3e018ef131878f32950d3622300e282c1c8a6594 (diff) | |
| download | catch3-7f6773bb4d4bcdb7858e63f906e8a80e746bea7e.tar.gz | |
Merge branch 'master' into dev-modernize
Hopefully nothing went too wrong.
Diffstat (limited to 'projects')
| -rw-r--r-- | projects/SelfTest/DecompositionTests.cpp | 28 | ||||
| -rw-r--r-- | projects/SelfTest/MiscTests.cpp | 2 | ||||
| -rw-r--r-- | projects/SelfTest/ToStringGeneralTests.cpp | 3 |
3 files changed, 30 insertions, 3 deletions
diff --git a/projects/SelfTest/DecompositionTests.cpp b/projects/SelfTest/DecompositionTests.cpp new file mode 100644 index 00000000..f2e04260 --- /dev/null +++ b/projects/SelfTest/DecompositionTests.cpp @@ -0,0 +1,28 @@ +/* + * Created by Martin on 27/5/2017. + * Copyright 2017 Two Blue Cubes Ltd. All rights reserved. + * + * Distributed under the Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + */ + +#include <iostream> + +struct truthy { + truthy(bool b):m_value(b){} + operator bool() const { + return false; + } + bool m_value; +}; + +std::ostream& operator<<(std::ostream& o, truthy) { + o << "Hey, its truthy!"; + return o; +} + +#include "catch.hpp" + +TEST_CASE( "Reconstruction should be based on stringification: #914" , "[Decomposition][failing][.]") { + CHECK(truthy(false)); +} diff --git a/projects/SelfTest/MiscTests.cpp b/projects/SelfTest/MiscTests.cpp index efa5c76f..9d837822 100644 --- a/projects/SelfTest/MiscTests.cpp +++ b/projects/SelfTest/MiscTests.cpp @@ -401,5 +401,5 @@ static int f() { TEST_CASE( "#835 -- errno should not be touched by Catch", "[!shouldfail]" ) { errno = 1; CHECK(f() == 0); - REQUIRE(errno == 1); // Check that f() doesn't touch errno. + REQUIRE(errno == 1); // Check that f() doesn't touch errno. } diff --git a/projects/SelfTest/ToStringGeneralTests.cpp b/projects/SelfTest/ToStringGeneralTests.cpp index bca913fb..743882b1 100644 --- a/projects/SelfTest/ToStringGeneralTests.cpp +++ b/projects/SelfTest/ToStringGeneralTests.cpp @@ -9,7 +9,6 @@ TEST_CASE( "Character pretty printing" ){ - // SECTION("Specifically escaped"){ char tab = '\t'; char newline = '\n'; @@ -36,7 +35,7 @@ TEST_CASE( "Character pretty printing" ){ char c = static_cast<char>(i); REQUIRE(c == i); } - } + } } |