Use the right append in test

std::string doesn't have an append(char)
This commit is contained in:
Jōshin 2024-06-06 22:06:08 -07:00
parent a8dcc1a71d
commit 38896c2ecd
No known key found for this signature in database

View file

@ -361,19 +361,19 @@ main()
// tests the small-string optimization on ctl::string
char* d = s.data();
for (int i = 0; i < 23; ++i) {
s.append('a');
s.append("a");
if (s.data() != d) {
return 79 + i;
}
}
s.append('a');
s.append("a");
if (s.data() == d) {
return 103;
}
} else {
// just check that append in a loop works
for (int i = 0; i < 24; ++i) {
s.append('a');
s.append("a");
}
}
if (s != "aaaaaaaaaaaaaaaaaaaaaaaa") {