Skip to content

Commit

Permalink
fix dims in test:
Browse files Browse the repository at this point in the history
  • Loading branch information
Semyon1104 committed Nov 29, 2024
1 parent c059a7e commit 582cda1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/model_read/model_read.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,23 +68,23 @@ TEST(ExtractValuesFromJsonTests, HandlesNestedArray) {
TEST(ParseJsonShapeTests, HandlesEmptyArray) {
json j = json::array({});
std::vector<size_t> shape;
parse_json_shape(j, shape);
parse_json_shape(j, shape, 0);
std::vector<size_t> expected = {0};
EXPECT_EQ(shape, expected);
}

TEST(ParseJsonShapeTests, HandlesSimpleArray) {
json j = json::array({{1.0, 2.0, 3.0}, {1.0, 2.0, 3.0}});
std::vector<size_t> shape;
parse_json_shape(j, shape);
parse_json_shape(j, shape, 0);
std::vector<size_t> expected = {3};
EXPECT_EQ(shape, expected);
}

TEST(ParseJsonShapeTests, HandlesNestedArray) {
json j = json::array({{{1.0, 2.0}, {3.0, 4.0}}, {3.0, 4.0}});
std::vector<size_t> shape;
parse_json_shape(j, shape);
parse_json_shape(j, shape, 0);
std::vector<size_t> expected = {2, 2};
EXPECT_EQ(shape, expected);
}
Expand Down Expand Up @@ -157,7 +157,7 @@ TEST(CreateTensorFromJsonTest, SimpleTensorCheckNoBias) {
TEST(CreateTensorFromJsonTest, EmptyShape) {
json j = json::array({});
std::vector<size_t> shape;
parse_json_shape(j, shape);
parse_json_shape(j, shape, 0);
std::vector<size_t> expected = {0};
EXPECT_EQ(shape, expected);
}
Expand All @@ -171,7 +171,7 @@ TEST(ParseJsonShapeTests, HandlesNonArrayJson) {
json j = "not_an_array";
std::vector<size_t> shape;

parse_json_shape(j, shape);
parse_json_shape(j, shape, 0);

std::vector<size_t> expected = {0};
EXPECT_EQ(shape, expected);
Expand Down

0 comments on commit 582cda1

Please sign in to comment.