1234567891011121314151617181920212223242526 |
- #include "tests/ArrayTests.h"
- #include "data/Array.h"
- #include "test/Test.h"
- static void testToString1(Core::Test& test) {
- Core::Array<int, 3> a;
- a[0] = 1;
- a[1] = 243;
- a[2] = -423;
- test.checkEqual(Core::String("[1, 243, -423]"), Core::String(a),
- "to string 1");
- }
- static void testToString2(Core::Test& test) {
- Core::Array<int, 1> a;
- a[0] = 1;
- test.checkEqual(Core::String("[1]"), Core::String(a), "to string 2");
- }
- void Core::ArrayTests::test() {
- Core::Test test("Array");
- testToString1(test);
- testToString2(test);
- test.finalize();
- }
|