mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-02 21:35:40 +02:00
Add more constexpr to StringRef
This commit is contained in:
@@ -2300,6 +2300,8 @@ ok {test-number} - s.substr(s.size() + 1, 123).empty() for: true
|
||||
# StringRef
|
||||
ok {test-number} - std::strcmp(ss.c_str(), "world!") == 0 for: 0 == 0
|
||||
# StringRef
|
||||
ok {test-number} - s.substr(1'000'000, 1).empty() for: true
|
||||
# StringRef
|
||||
ok {test-number} - (char*)buffer1 != (char*)buffer2 for: "Hello" != "Hello"
|
||||
# StringRef
|
||||
ok {test-number} - left == right for: Hello == Hello
|
||||
@@ -2326,15 +2328,33 @@ ok {test-number} - stdStr == "a stringref" for: "a stringref" == "a stringref"
|
||||
# StringRef
|
||||
ok {test-number} - stdStr.size() == sr.size() for: 11 == 11
|
||||
# StringRef at compilation time
|
||||
ok {test-number} - with 1 message: 'StringRef{}.size() == 0'
|
||||
ok {test-number} - with 1 message: 'empty.size() == 0'
|
||||
# StringRef at compilation time
|
||||
ok {test-number} - with 1 message: 'StringRef{ "abc", 3 }.size() == 3'
|
||||
ok {test-number} - with 1 message: 'empty.begin() == empty.end()'
|
||||
# StringRef at compilation time
|
||||
ok {test-number} - with 1 message: 'StringRef{ "abc", 3 }.isNullTerminated()'
|
||||
ok {test-number} - with 1 message: 'stringref.size() == 3'
|
||||
# StringRef at compilation time
|
||||
ok {test-number} - with 1 message: 'StringRef{ "abc", 2 }.size() == 2'
|
||||
ok {test-number} - with 1 message: 'stringref.isNullTerminated()'
|
||||
# StringRef at compilation time
|
||||
ok {test-number} - with 1 message: '!(StringRef{ "abc", 2 }.isNullTerminated())'
|
||||
ok {test-number} - with 1 message: 'stringref.data() == abc'
|
||||
# StringRef at compilation time
|
||||
ok {test-number} - with 1 message: 'stringref.begin() == abc'
|
||||
# StringRef at compilation time
|
||||
ok {test-number} - with 1 message: 'stringref.begin() != stringref.end()'
|
||||
# StringRef at compilation time
|
||||
ok {test-number} - with 1 message: 'stringref.substr(10, 0).empty()'
|
||||
# StringRef at compilation time
|
||||
ok {test-number} - with 1 message: 'stringref.substr(2, 1).data() == abc + 2'
|
||||
# StringRef at compilation time
|
||||
ok {test-number} - with 1 message: 'shortened.size() == 2'
|
||||
# StringRef at compilation time
|
||||
ok {test-number} - with 1 message: 'shortened.data() == abc'
|
||||
# StringRef at compilation time
|
||||
ok {test-number} - with 1 message: 'shortened.begin() != shortened.end()'
|
||||
# StringRef at compilation time
|
||||
ok {test-number} - with 1 message: '!(shortened.isNullTerminated())'
|
||||
# StringRef at compilation time
|
||||
ok {test-number} - with 1 message: '!(shortened.substr(1, 3).isNullTerminated())'
|
||||
# StringRef at compilation time
|
||||
ok {test-number} - with 1 message: '!(sr1.empty())'
|
||||
# StringRef at compilation time
|
||||
@@ -3590,5 +3610,5 @@ ok {test-number} - q3 == 23. for: 23.0 == 23.0
|
||||
ok {test-number} -
|
||||
# xmlentitycheck
|
||||
ok {test-number} -
|
||||
1..1791
|
||||
1..1801
|
||||
|
||||
|
Reference in New Issue
Block a user