diff options
| author | Phil Nash | 2010-11-16 19:30:41 +0000 |
|---|---|---|
| committer | Phil Nash | 2010-11-16 19:30:41 +0000 |
| commit | 7d1ce5fadeaa20ef22a974e3bd269c1465dedc2a (patch) | |
| tree | 6310d4481e29c733e0f6057ba4d05df96a02e271 /Test/TrickyTests.cpp | |
| parent | f59ecbcad6f33210af9d2a8f1de20bc94eba89a0 (diff) | |
| download | catch3-7d1ce5fadeaa20ef22a974e3bd269c1465dedc2a.tar.gz | |
toString() now works with non-specialised non-streamable types
Diffstat (limited to 'Test/TrickyTests.cpp')
| -rw-r--r-- | Test/TrickyTests.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Test/TrickyTests.cpp b/Test/TrickyTests.cpp index 73378323..707e50d5 100644 --- a/Test/TrickyTests.cpp +++ b/Test/TrickyTests.cpp @@ -41,3 +41,23 @@ TEST_CASE( "succeeding/Tricky/complex lhs", "Where the LHS is not a simple value // This only captures part of the expression, but issues a warning about the rest EXPECT( a == 2 || b == 2 ); } + +struct Opaque +{ + int val; + bool operator ==( const Opaque& o ) + { + return val = o.val; + } +}; + +TEST_CASE( "failing/Tricky/non streamable type", "A failing expression with a non streamable type is still captured" ) +{ + + Opaque o1, o2; + o1.val = 7; + o2.val = 8; + + CHECK( &o1 == &o2 ); + CHECK( o1 == o2 ); +}
\ No newline at end of file |