don't use strcmp in tests
parent
874f8a3c14
commit
ede7e3f8b6
|
@ -1,5 +1,4 @@
|
|||
#include <assert.h>
|
||||
#include <string.h>
|
||||
#include "ostd/array.hh"
|
||||
#include "ostd/string.hh"
|
||||
|
||||
|
@ -39,7 +38,7 @@ int main() {
|
|||
|
||||
assert(z.size() == 5);
|
||||
|
||||
assert(!strcmp(to_string(z).data(), "{2, 4, 8, 16, 32}"));
|
||||
assert(to_string(z) == "{2, 4, 8, 16, 32}");
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -1,5 +1,4 @@
|
|||
#include <assert.h>
|
||||
#include <string.h>
|
||||
#include "ostd/utility.hh"
|
||||
#include "ostd/string.hh"
|
||||
|
||||
|
@ -85,7 +84,7 @@ int main() {
|
|||
assert(x.second == 3.14f);
|
||||
|
||||
auto st = make_pair(5, 10);
|
||||
assert(!strcmp(to_string(st).data(), "{5, 10}"));
|
||||
assert(to_string(st) == "{5, 10}");
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -1,5 +1,4 @@
|
|||
#include <assert.h>
|
||||
#include <string.h>
|
||||
#include "ostd/vector.hh"
|
||||
#include "ostd/string.hh"
|
||||
|
||||
|
@ -85,7 +84,7 @@ int main() {
|
|||
assert(w.front() == 5);
|
||||
assert(w.back() == 5);
|
||||
|
||||
assert(!strcmp(to_string(w).data(), "{5, 5, 4, 5, 5, 5, 5, 5, 5, 5, 5}"));
|
||||
assert(to_string(w) == "{5, 5, 4, 5, 5, 5, 5, 5, 5, 5, 5}");
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue