Add std::basic_string test cases (#74830)
Extend `std::basic_string` tests to cover more buffer situations and length in general, particularly non-SSO cases after SSO test cases (changing buffers). This commit is a side effect of working on tests for ASan annotations. Related PR: https://github.com/llvm/llvm-project/pull/72677
This commit is contained in:
1 parent
3568521e3d
commit
c77cdbac9b
22 files changed
+113
No files matched your search
@@ -45,6 +45,14 @@ TEST_CONSTEXPR_CXX20 void test_string() {
|
||||
test(S("12345678901234567890"), S("12345"), S("1234567890123456789012345"));
|
||||
test(S("12345678901234567890"), S("1234567890"), S("123456789012345678901234567890"));
|
||||
test(S("12345678901234567890"), S("12345678901234567890"), S("1234567890123456789012345678901234567890"));
|
||||
|
||||
// Starting from long string (no SSO)
|
||||
test(S("123456789012345678901234567890"), S(), S("123456789012345678901234567890"));
|
||||
test(S("123456789012345678901234567890"), S("12345"), S("12345678901234567890123456789012345"));
|
||||
test(S("123456789012345678901234567890"), S("1234567890"), S("1234567890123456789012345678901234567890"));
|
||||
test(S("123456789012345678901234567890"),
|
||||
S("12345678901234567890"),
|
||||
S("12345678901234567890123456789012345678901234567890"));
|
||||
}
|
||||
|
||||
TEST_CONSTEXPR_CXX20 bool test() {
|
||||
|
||||
Reference in new issue
Block a user