Skip to content

Commit

Permalink
Merge branch 'main' into feature/voice-allocator
Browse files Browse the repository at this point in the history
  • Loading branch information
tremblap committed Jul 17, 2024
2 parents 17a49b2 + aa4f560 commit a2d385e
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions tests/data/TestFluidTensor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ TEST_CASE("FluidTensor can be created from a list of dimenions","[FluidTensor]")

REQUIRE(x.size() == 3);
REQUIRE(x.rows() == 3);
REQUIRE(x.cols() == 1);
// REQUIRE(x.cols() == 1);
REQUIRE(std::distance(x.begin(),x.end()) == x.size());
}
SECTION("2D creation reports correct sizes"){
Expand All @@ -31,15 +31,15 @@ TEST_CASE("FluidTensor can be created from a list of dimenions","[FluidTensor]")
REQUIRE(x.cols() == 2);
REQUIRE(std::distance(x.begin(),x.end()) == x.size());
}
// SECTION("3D creation reports correct sizes"){
// const FluidTensor<int,3> x(fluid::FluidDefaultAllocator(), 3,2,5);
SECTION("3D creation reports correct sizes"){
const FluidTensor<int,3> x(3,2,5);

// REQUIRE(x.size() == (3 * 2 * 5));
// REQUIRE(x.rows() == 3);
// REQUIRE(x.cols() == 2);
// REQUIRE(x.descriptor().extents[2] == 5);
// REQUIRE(std::distance(x.begin(),x.end()) == x.size());
// }
REQUIRE(x.size() == (3 * 2 * 5));
REQUIRE(x.rows() == 3);
REQUIRE(x.cols() == 2);
REQUIRE(x.descriptor().extents[2] == 5);
REQUIRE(std::distance(x.begin(),x.end()) == x.size());
}
}

TEST_CASE("FluidTensor can be initialized from initializer lists","[FluidTensor]"){
Expand All @@ -62,7 +62,7 @@ TEST_CASE("FluidTensor can be initialized from initializer lists","[FluidTensor]
4};
const std::array<int, 5> y{0,1,2,3,4};
REQUIRE(x.rows() == 5);
REQUIRE(x.cols() == 1);
// REQUIRE(x.cols() == 1);
REQUIRE(std::distance(x.begin(),x.end()) == x.size());
REQUIRE(std::equal(x.begin(),x.end(), y.begin()));
}
Expand Down

0 comments on commit a2d385e

Please sign in to comment.