Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
1uc committed May 17, 2024
1 parent e5e8839 commit 35ab518
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion tests/unit/test_xtensor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ TEST_CASE("xt::xarray reshape", "[xtensor]") {
}

TEST_CASE("xt::xview example", "[xtensor]") {
File file("rw_dataset_xarray.h5", File::Truncate);
File file("rw_dataset_xview.h5", File::Truncate);

std::vector<size_t> shape{13, 5, 7};
xt::xarray<double> a = testing::DataGenerator<xt::xtensor<double, 3>>::create(shape);
Expand Down Expand Up @@ -127,4 +127,16 @@ void check_xtensor_empty(File& file, const XTensor& a, const std::vector<size_t>
REQUIRE(c_shape == expected_dims);
}

TEST_CASE("xt::xtensor empty", "[xtensor]") {
File file("rw_dataset_xtensor_empty.h5", File::Truncate);
xt::xtensor<double, 3> a({0, 1, 1});
check_xtensor_empty(file, a, {0, 1, 1, 1});
}

TEST_CASE("xt::xarray empty", "[xtensor]") {
File file("rw_dataset_xarray_empty.h5", File::Truncate);
xt::xarray<double> a(std::vector<size_t>{1, 0, 1});
check_xtensor_empty(file, a, {0});
}

#endif

0 comments on commit 35ab518

Please sign in to comment.