mirror of
https://github.com/clang-retro/llvm.git
synced 2026-12-03 15:50:34 -08:00
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
@@ -37,6 +37,11 @@ TEST_CONSTEXPR_CXX20 void test_string() {
|
||||
test(S("12345678901234567890"), "", S());
|
||||
test(S("12345678901234567890"), "12345", S("12345"));
|
||||
test(S("12345678901234567890"), "12345678901234567890", S("12345678901234567890"));
|
||||
|
||||
// Starting from long string (no SSO)
|
||||
test(S("1234512345678901234567890"), "", S());
|
||||
test(S("1234512345678901234567890"), "12345", S("12345"));
|
||||
test(S("1234512345678901234567890"), "12345678901234567890", S("12345678901234567890"));
|
||||
}
|
||||
|
||||
TEST_CONSTEXPR_CXX20 bool test() {
|
||||
|
||||
Reference in new issue
Block a user