Skip to content

Commit b16467a

Browse files
committed
potential bug fix
Former-commit-id: b69b0a6
1 parent 1495b3c commit b16467a

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

test/test-array.cpp

+13-13
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ namespace lrc = librapid;
88
#define TEST_CONSTRUCTORS(SCALAR, DEVICE) \
99
SECTION(fmt::format("Test Constructors [{} | {}]", STRINGIFY(SCALAR), STRINGIFY(DEVICE))) { \
1010
lrc::Array<SCALAR, DEVICE> testA; \
11-
REQUIRE(testA.shape() == lrc::Shape {0}); \
11+
REQUIRE(testA.shape() == lrc::Array<SCALAR, DEVICE>::ShapeType {0}); \
1212
\
13-
lrc::Array<SCALAR, DEVICE> testB(lrc::Shape {3, 4}); \
14-
REQUIRE(testB.shape() == lrc::Shape {3, 4}); \
13+
lrc::Array<SCALAR, DEVICE> testB(lrc::Array<SCALAR, DEVICE>::ShapeType {3, 4}); \
14+
REQUIRE(testB.shape() == lrc::Array<SCALAR, DEVICE>::ShapeType {3, 4}); \
1515
\
16-
lrc::Array<SCALAR, DEVICE> testC(lrc::Shape {3, 4}, 5); \
17-
REQUIRE(testC.shape() == lrc::Shape {3, 4}); \
16+
lrc::Array<SCALAR, DEVICE> testC(lrc::Array<SCALAR, DEVICE>::ShapeType {3, 4}, 5); \
17+
REQUIRE(testC.shape() == lrc::Array<SCALAR, DEVICE>::ShapeType {3, 4}); \
1818
REQUIRE(testC.storage()[0] == 5); \
1919
REQUIRE(testC.storage()[1] == 5); \
2020
REQUIRE(testC.storage()[2] == 5); \
@@ -28,20 +28,20 @@ namespace lrc = librapid;
2828
REQUIRE(testD.storage()[2] == 3); \
2929
REQUIRE(testD.storage()[3] == 3); \
3030
\
31-
lrc::Shape tmpShape({2, 3}); \
31+
lrc::Array<SCALAR, DEVICE>::ShapeType tmpShape({2, 3}); \
3232
lrc::Array<SCALAR, DEVICE> testE(std::move(tmpShape)); \
33-
REQUIRE(testE.shape() == lrc::Shape {2, 3}); \
33+
REQUIRE(testE.shape() == lrc::Array<SCALAR, DEVICE>::ShapeType {2, 3}); \
3434
\
3535
lrc::Array<SCALAR, DEVICE> testF(testC); \
36-
REQUIRE(testF.shape() == lrc::Shape {3, 4}); \
36+
REQUIRE(testF.shape() == lrc::Array<SCALAR, DEVICE>::ShapeType {3, 4}); \
3737
REQUIRE(testF.storage()[0] == 5); \
3838
REQUIRE(testF.storage()[1] == 5); \
3939
REQUIRE(testF.storage()[2] == 5); \
4040
REQUIRE(testF.storage()[9] == 5); \
4141
REQUIRE(testF.storage()[10] == 5); \
4242
REQUIRE(testF.storage()[11] == 5); \
4343
\
44-
lrc::Array<SCALAR, DEVICE> testG(lrc::Shape {3, 4}, 10); \
44+
lrc::Array<SCALAR, DEVICE> testG(lrc::Array<SCALAR, DEVICE>::ShapeType {3, 4}, 10); \
4545
testC = testG; \
4646
REQUIRE(testC.storage()[0] == 10); \
4747
REQUIRE(testC.storage()[1] == 10); \
@@ -50,7 +50,7 @@ namespace lrc = librapid;
5050
REQUIRE(testC.storage()[10] == 10); \
5151
REQUIRE(testC.storage()[11] == 10); \
5252
\
53-
lrc::Array<SCALAR, DEVICE> testH(lrc::Shape {3, 3}); \
53+
lrc::Array<SCALAR, DEVICE> testH(lrc::Array<SCALAR, DEVICE>::ShapeType {3, 3}); \
5454
testH << 1, 2, 3, 4, 5, 6, 7, 8, 9; \
5555
REQUIRE(testH.storage()[0] == 1); \
5656
REQUIRE(testH.storage()[1] == 2); \
@@ -65,7 +65,7 @@ namespace lrc = librapid;
6565

6666
#define TEST_INDEXING(SCALAR, DEVICE) \
6767
SECTION(fmt::format("Test Indexing [{} | {}]", STRINGIFY(SCALAR), STRINGIFY(DEVICE))) { \
68-
lrc::Array<SCALAR, DEVICE> testA(lrc::Shape({5, 3})); \
68+
lrc::Array<SCALAR, DEVICE> testA(lrc::Array<SCALAR, DEVICE>::ShapeType({5, 3})); \
6969
testA << 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15; \
7070
std::string index0 = fmt::format("[{} {} {}]", SCALAR(1), SCALAR(2), SCALAR(3)); \
7171
std::string index1 = fmt::format("[{} {} {}]", SCALAR(4), SCALAR(5), SCALAR(6)); \
@@ -96,7 +96,7 @@ namespace lrc = librapid;
9696
#define TEST_STRING_FORMATTING(SCALAR, DEVICE) \
9797
SECTION( \
9898
fmt::format("Test String Formatting [{} | {}]", STRINGIFY(SCALAR), STRINGIFY(DEVICE))) { \
99-
lrc::Array<SCALAR, DEVICE> testA(lrc::Shape({2, 3})); \
99+
lrc::Array<SCALAR, DEVICE> testA(lrc::Array<SCALAR, DEVICE>::ShapeType({2, 3})); \
100100
testA << 1, 2, 3, 4, 5, 6; \
101101
\
102102
REQUIRE(testA.str() == fmt::format("[[{} {} {}]\n [{} {} {}]]", \
@@ -107,7 +107,7 @@ namespace lrc = librapid;
107107
SCALAR(5), \
108108
SCALAR(6))); \
109109
\
110-
lrc::Array<SCALAR, DEVICE> testB(lrc::Shape({2, 3})); \
110+
lrc::Array<SCALAR, DEVICE> testB(lrc::Array<SCALAR, DEVICE>::ShapeType({2, 3})); \
111111
testB << 10, 2, 3, 4, 5, 6; \
112112
\
113113
REQUIRE(testB.str() == fmt::format("[[{} {} {}]\n [ {} {} {}]]", \

0 commit comments

Comments
 (0)