ArrayTests.cpp 380 B

123456789101112131415161718192021
  1. #include "../Tests.hpp"
  2. #include "core/data/Array.hpp"
  3. static void testToString1() {
  4. Core::Array<int, 3> a;
  5. a[0] = 1;
  6. a[1] = 243;
  7. a[2] = -423;
  8. CORE_TEST_STRING("[1, 243, -423]", a);
  9. }
  10. static void testToString2() {
  11. Core::Array<int, 1> a;
  12. a[0] = 1;
  13. CORE_TEST_STRING("[1]", a);
  14. }
  15. void Core::testArray() {
  16. testToString1();
  17. testToString2();
  18. }