You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
doctest/examples/all_features/check_doctest_string.cpp

11 lines
299 B
C++

#include <doctest/doctest.h>
TEST_SUITE("doctest unit tests") {
TEST_CASE("doctest::String::substr()") {
const doctest::String abcde = "abcde";
CHECK(abcde.substr(0, 3) == "abc");
CHECK(abcde.substr(2, 3) == "cde");
CHECK(abcde.substr(0, 5) == "abcde");
}
}