Merge branch 'template_on_gain0' into dev/move_dim

This commit is contained in:
Erik Fröjdh
2025-07-25 10:45:20 +02:00
committed by GitHub
2 changed files with 52 additions and 1 deletions

View File

@@ -430,6 +430,7 @@ TEST_CASE("Construct an NDArray from an std::array") {
}
TEST_CASE("Move construct from an array with Ndim + 1") {
NDArray<int, 3> a({{1,2,2}}, 0);
a(0, 0, 0) = 1;
@@ -451,4 +452,5 @@ TEST_CASE("Move construct from an array with Ndim + 1") {
TEST_CASE("Move construct from an array with Ndim + 1 throws on size mismatch") {
NDArray<int, 3> a({{2,2,2}}, 0);
REQUIRE_THROWS(NDArray<int, 2>(std::move(a)));
}
}