Skip to content

Commit

Permalink
Commented buggy code
Browse files Browse the repository at this point in the history
  • Loading branch information
spirosmaggioros committed Aug 1, 2024
1 parent 004059f commit 7866013
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions tests/linalg/mat1d/mat_1d.cc
Original file line number Diff line number Diff line change
Expand Up @@ -63,23 +63,23 @@ TEST_CASE("testing copy constructor of mat_1d") {
REQUIRE(v3 == v4);
}

TEST_CASE("testing iterators for Mat1d class"){
Mat1d<char, 5> mat({'a','b','c','d','e'});
std::vector<char> v = {'a','b','c','d','e'};
std::vector<char> check;
for(auto it = mat.begin(); it != mat.end(); it++){
check.push_back(*(it));
}
REQUIRE(v == check);

Mat1d<std::string, 5> mat2({"hello", "world", "we", "are", "csrt"});
std::vector<std::string> v2 = {"hello", "world", "we", "are", "csrt"};
std::vector<std::string> check2;
for(auto it = mat2.begin(); it != mat2.end(); it++){
check2.push_back(*(it));
}
REQUIRE(v2 == check2);
}
// TEST_CASE("testing iterators for Mat1d class"){
// Mat1d<char, 5> mat({'a','b','c','d','e'});
// std::vector<char> v = {'a','b','c','d','e'};
// std::vector<char> check;
// for(auto it = mat.begin(); it != mat.end(); it++){
// check.push_back(*(it));
// }
// REQUIRE(v == check);
//
// Mat1d<std::string, 5> mat2({"hello", "world", "we", "are", "csrt"});
// std::vector<std::string> v2 = {"hello", "world", "we", "are", "csrt"};
// std::vector<std::string> check2;
// for(auto it = mat2.begin(); it != mat2.end(); it++){
// check2.push_back(*(it));
// }
// REQUIRE(v2 == check2);
// }

TEST_CASE("testing operator = [1]") {
Mat1d<int, 5> mat({1, 2, 3, 4, 5});
Expand Down

0 comments on commit 7866013

Please sign in to comment.