mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-08-03 16:30:29 +00:00
Use the right append in test
std::string doesn't have an append(char)
This commit is contained in:
parent
a8dcc1a71d
commit
38896c2ecd
1 changed files with 3 additions and 3 deletions
|
@ -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") {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue