mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2025-06-11 06:47:14 +02:00
added first tests for reading files
This commit is contained in:
@ -175,4 +175,20 @@ TEST_CASE("Retrieve shape"){
|
||||
REQUIRE(data.shape()[0] == 3);
|
||||
REQUIRE(data.shape()[1] == 4);
|
||||
|
||||
}
|
||||
|
||||
TEST_CASE("compare two views"){
|
||||
std::vector<int> vec1;
|
||||
for (int i = 0; i != 12; ++i) {
|
||||
vec1.push_back(i);
|
||||
}
|
||||
NDView<int,2> view1(vec1.data(), Shape<2>{3,4});
|
||||
|
||||
std::vector<int> vec2;
|
||||
for (int i = 0; i != 12; ++i) {
|
||||
vec2.push_back(i);
|
||||
}
|
||||
NDView<int,2> view2(vec2.data(), Shape<2>{3,4});
|
||||
|
||||
REQUIRE(view1 == view2);
|
||||
}
|
Reference in New Issue
Block a user