diff --git a/tests/array.cc b/tests/array.cc index 694850b..1e8ab57 100644 --- a/tests/array.cc +++ b/tests/array.cc @@ -1,5 +1,4 @@ #include -#include #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; } \ No newline at end of file diff --git a/tests/utility.cc b/tests/utility.cc index 35de0bd..a6d2b60 100644 --- a/tests/utility.cc +++ b/tests/utility.cc @@ -1,5 +1,4 @@ #include -#include #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; } \ No newline at end of file diff --git a/tests/vector.cc b/tests/vector.cc index ee1765b..db094ef 100644 --- a/tests/vector.cc +++ b/tests/vector.cc @@ -1,5 +1,4 @@ #include -#include #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; } \ No newline at end of file