ArrayTests.cpp 410 B

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