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:
authoronqtam <vik.kirilov@gmail.com>2017-05-09 18:18:58 +0300
committeronqtam <vik.kirilov@gmail.com>2017-05-16 00:22:25 +0300
commit513cf695a2ddc9edec8fa9a1d5bd6cef0c0903ed (patch)
tree8aadd537cf33e2de191c773fa759b67efde227d2 /examples
parent458aea11e628e612e8e335d6bb4a6a3fc660d4d9 (diff)
implementation of a string class with a small buffer optimization - relates #69
Diffstat (limited to 'examples')
-rw-r--r--examples/all_features/coverage_maxout.cpp5
-rw-r--r--examples/all_features/test_output/abort_after.txt2
-rw-r--r--examples/all_features/test_output/coverage_maxout.cpp.txt2
3 files changed, 4 insertions, 5 deletions
diff --git a/examples/all_features/coverage_maxout.cpp b/examples/all_features/coverage_maxout.cpp
index fe1f14df..ed9f9271 100644
--- a/examples/all_features/coverage_maxout.cpp
+++ b/examples/all_features/coverage_maxout.cpp
@@ -33,11 +33,10 @@ TEST_CASE("doctest internals") {
CHECK(String("a.cpp") < String("b.cpp"));
// trigger code path for string with nullptr
- String a(static_cast<const char*>(doctest::detail::getNull()));
+ String a;
const String const_str("omgomgomg");
a = const_str.c_str();
CHECK(a.size() == const_str.size());
- CHECK(a.length() == const_str.length());
CHECK_MESSAGE(a.compare(const_str, true) != 0, "should fail");
CHECK_MESSAGE(a.compare("omgomgomg", false) != 0, "should fail");
@@ -67,7 +66,7 @@ TEST_CASE("doctest internals") {
oss << detail::getAssertString(static_cast<detail::assertType::Enum>(3));
a += oss.str().c_str();
// trigger code path for rawMemoryToString
- bool len_is_zero = detail::rawMemoryToString(a).length() == 0u;
+ bool len_is_zero = detail::rawMemoryToString(a).size() == 0u;
CHECK_MESSAGE(len_is_zero, "should fail");
}
diff --git a/examples/all_features/test_output/abort_after.txt b/examples/all_features/test_output/abort_after.txt
index 62ff2c42..99013871 100644
--- a/examples/all_features/test_output/abort_after.txt
+++ b/examples/all_features/test_output/abort_after.txt
@@ -20,6 +20,6 @@ with context:
Aborting - too many failed asserts!
===============================================================================
[doctest] test cases: 1 | 0 passed | 1 failed |
-[doctest] assertions: 6 | 4 passed | 2 failed |
+[doctest] assertions: 5 | 3 passed | 2 failed |
[doctest] Status: FAILURE!
Program code.
diff --git a/examples/all_features/test_output/coverage_maxout.cpp.txt b/examples/all_features/test_output/coverage_maxout.cpp.txt
index 3fcf0209..f5d00669 100644
--- a/examples/all_features/test_output/coverage_maxout.cpp.txt
+++ b/examples/all_features/test_output/coverage_maxout.cpp.txt
@@ -53,6 +53,6 @@ threw exception:
===============================================================================
[doctest] test cases: 4 | 0 passed | 4 failed |
-[doctest] assertions: 7 | 4 passed | 3 failed |
+[doctest] assertions: 6 | 3 passed | 3 failed |
[doctest] Status: FAILURE!
Program code.