don't use strcmp in tests

master
Daniel Kolesa 2015-07-21 21:46:43 +01:00
parent 874f8a3c14
commit ede7e3f8b6
3 changed files with 3 additions and 6 deletions

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}