Skip to content
Snippets Groups Projects
Commit 9937b14f authored by Stéphane Del Pino's avatar Stéphane Del Pino
Browse files

Replaced REQUIRE_NOTHROW -> REQUIRE for tests.

REQUIRE_NOTHROW just checks that no exceptions are thrown, does not check the
validity of the result
parent b7108bf8
No related branches found
No related tags found
No related merge requests found
...@@ -5,18 +5,18 @@ ...@@ -5,18 +5,18 @@
TEST_CASE("TinyVector", "[algebra]") { TEST_CASE("TinyVector", "[algebra]") {
TinyVector<3,int> v(1,2,3); TinyVector<3,int> v(1,2,3);
REQUIRE_NOTHROW(((v[0] == 1) and (v[1] == 2) and (v[2] == 3))); REQUIRE(((v[0] == 1) and (v[1] == 2) and (v[2] == 3)));
REQUIRE(v.dimension() == 3); REQUIRE(v.dimension() == 3);
const TinyVector<3,int> z = zero; const TinyVector<3,int> z = zero;
REQUIRE_NOTHROW(((z[0] == 0) and (z[1] == 0) and (z[2] == 0))); REQUIRE(((z[0] == 0) and (z[1] == 0) and (z[2] == 0)));
v = TinyVector<3,int>(3,2,4); v = TinyVector<3,int>(3,2,4);
TinyVector<3,int> w(1,2,6); TinyVector<3,int> w(1,2,6);
REQUIRE((v,w)==31); REQUIRE((v,w)==31);
w = 2*v; w = 2*v;
REQUIRE_NOTHROW(((w[0] == 2*v[0]) and (w[1]==2*v[1]) and (w[2]==2*v[2]))); REQUIRE(((w[0] == 2*v[0]) and (w[1]==2*v[1]) and (w[2]==2*v[2])));
TinyVector<3,int> x = v; TinyVector<3,int> x = v;
REQUIRE(x==v); REQUIRE(x==v);
...@@ -43,7 +43,7 @@ TEST_CASE("TinyVector", "[algebra]") { ...@@ -43,7 +43,7 @@ TEST_CASE("TinyVector", "[algebra]") {
REQUIRE(x==v); REQUIRE(x==v);
TinyVector<3,int> z1; z1 = zero; TinyVector<3,int> z1; z1 = zero;
REQUIRE_NOTHROW(((z1[0] == 0) and (z1[1] == 0) and (z1[2] == 0))); REQUIRE(((z1[0] == 0) and (z1[1] == 0) and (z1[2] == 0)));
REQUIRE(Catch::Detail::stringify(x) == "(3,2,4)"); REQUIRE(Catch::Detail::stringify(x) == "(3,2,4)");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment