Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/onqtam/doctest.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMenno Fraters <menno.fraters@tutanota.com>2022-03-06 02:14:35 +0300
committerGitHub <noreply@github.com>2022-03-06 02:14:35 +0300
commit8de4cf7e759c55a89761c25900d80e01ae7ac3fd (patch)
treeeda913a29bc57e9d3ed018e45eb7ffd0aac6ffdf /examples/all_features/stringification.cpp
parentbef19659da2b7ca49feec44fd0756072470836a0 (diff)
Add contains option to checks. (#620)
* Add contains otion to checks. * Add test for teh contains option of CHECK_THROWS_WITH. * Adress comments Saalvage: move compare function to Contains, add operator== and make m_exception_string a union." * Add new tests. * Attempt to fix windows specific warning about unions. * Attempt 2 to fix windows specific warning about unions. * Attempt 3 to fix windows specific warning about unions. * Attempt 4 to fix windows specific warning about unions. * Return union to a struct. * Fixing and refactoring * Docs Co-authored-by: Salvage <29021710+Saalvage@users.noreply.github.com>
Diffstat (limited to 'examples/all_features/stringification.cpp')
-rw-r--r--examples/all_features/stringification.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/examples/all_features/stringification.cpp b/examples/all_features/stringification.cpp
index adca1e7f..2add560d 100644
--- a/examples/all_features/stringification.cpp
+++ b/examples/all_features/stringification.cpp
@@ -151,6 +151,8 @@ TEST_CASE("all asserts should fail and show how the objects get stringified") {
CHECK(doctest::IsNaN<float>(std::numeric_limits<float>::infinity()));
// can't test actual nan because it's implementation defined
+ CHECK("a" == doctest::Contains("aaa"));
+
// lets see if this exception gets translated
throw_if(true, bla1);
}