Browse Source

Fix unit tests build.

legacy
Sam Hocevar 4 years ago
parent
commit
c5b273fb57
3 changed files with 11 additions and 11 deletions
  1. +2
    -2
      src/t/math/array2d.cpp
  2. +3
    -3
      src/t/math/array3d.cpp
  3. +6
    -6
      src/t/math/arraynd.cpp

+ 2
- 2
src/t/math/array2d.cpp View File

@@ -50,8 +50,8 @@ lolunit_declare_fixture(array2d_test)
{ 5, 6, 7, 8 },
{ 9, 8, 7, 6 } };

lolunit_assert_equal(a.size().x, 4);
lolunit_assert_equal(a.size().y, 3);
lolunit_assert_equal(a.sizes().x, 4);
lolunit_assert_equal(a.sizes().y, 3);

lolunit_assert_equal(a[0][0], 1);
lolunit_assert_equal(a[1][0], 2);


+ 3
- 3
src/t/math/array3d.cpp View File

@@ -53,9 +53,9 @@ lolunit_declare_fixture(array3d_test)
{ -5, -6, -7, -8 },
{ -9, -8, -7, -6 } } };

lolunit_assert_equal(a.size().x, 4);
lolunit_assert_equal(a.size().y, 3);
lolunit_assert_equal(a.size().z, 2);
lolunit_assert_equal(a.sizes().x, 4);
lolunit_assert_equal(a.sizes().y, 3);
lolunit_assert_equal(a.sizes().z, 2);

lolunit_assert_equal(a[0][0][0], 1);
lolunit_assert_equal(a[1][0][0], 2);


+ 6
- 6
src/t/math/arraynd.cpp View File

@@ -54,9 +54,9 @@ lolunit_declare_fixture(arraynd_test)

arraynd<3, int> e = { { {1, 2}, {3, 4} }, { {5, 6}, {7, 8} } };

lolunit_assert_equal(e.size()[0], 2);
lolunit_assert_equal(e.size()[1], 2);
lolunit_assert_equal(e.size()[2], 2);
lolunit_assert_equal(e.sizes()[0], 2);
lolunit_assert_equal(e.sizes()[1], 2);
lolunit_assert_equal(e.sizes()[2], 2);

lolunit_assert_equal(e[0][0][0], 1);
lolunit_assert_equal(e[1][0][0], 2);
@@ -69,9 +69,9 @@ lolunit_declare_fixture(arraynd_test)

arraynd<3, int> f = { { {1, 2, 3, 4}, {5, 6, 7} }, { {8, 9}, {10} } };

lolunit_assert_equal(f.size()[0], 4);
lolunit_assert_equal(f.size()[1], 2);
lolunit_assert_equal(f.size()[2], 2);
lolunit_assert_equal(f.sizes()[0], 4);
lolunit_assert_equal(f.sizes()[1], 2);
lolunit_assert_equal(f.sizes()[2], 2);

lolunit_assert_equal(f[0][0][0], 1);
lolunit_assert_equal(f[1][0][0], 2);


Loading…
Cancel
Save