#include "tests/ArrayTests.h" #include "data/Array.h" #include "test/Test.h" using String = Core::ArrayString<128>; template static String build(const T& t) { String s; CORE_TEST_FALSE(s.append(t)); return s; } static void testToString1() { Core::Array a; a[0] = 1; a[1] = 243; a[2] = -423; CORE_TEST_EQUAL(build("[1, 243, -423]"), build(a)); } static void testToString2() { Core::Array a; a[0] = 1; CORE_TEST_EQUAL(build("[1]"), build(a)); } void Core::ArrayTests::test() { testToString1(); testToString2(); }