Skip to content

Commit

Permalink
Fix -Werror=parentheses warnings/erros
Browse files Browse the repository at this point in the history
  • Loading branch information
dcoeurjo committed Sep 1, 2015
1 parent c0d2adf commit b60e93b
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions tests/kernel/testPointVector-catch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ TEST_CASE( "Point Vector Unit tests" )

SECTION("Comparisons")
{
REQUIRE( p1 == p1bis );
REQUIRE( (p1 == p1bis) );
REQUIRE( p1 < p2 );

#ifdef CPP11_INITIALIZER_LIST
Expand All @@ -71,10 +71,10 @@ TEST_CASE( "Point Vector Unit tests" )

SECTION("Min/Max of vector components")
{
REQUIRE( p3.max() == 2.0 );
REQUIRE( p3.min() == -2.0 );
REQUIRE( *p3.maxElement() == 2.0 );
REQUIRE( *p3.minElement() == -2.0 );
REQUIRE( (p3.max() == 2.0) );
REQUIRE( (p3.min() == -2.0) );
REQUIRE( (*p3.maxElement() == 2.0) );
REQUIRE( (*p3.minElement() == -2.0) );
}

Point aPoint;
Expand All @@ -87,12 +87,12 @@ TEST_CASE( "Point Vector Unit tests" )
{
RealPoint normalized = aPoint.getNormalized();
CAPTURE( normalized );
REQUIRE( aPoint.norm ( Point::L_1 ) == 6 );
REQUIRE( aPoint.norm ( Point::L_infty ) == 3 );
REQUIRE( normalized[0] == Approx( 0.801784) );
REQUIRE( normalized[1] == Approx( -0.267261) );
REQUIRE( normalized[2] == Approx( 0.534522) );
REQUIRE( normalized[3] == Approx( 0.0) );
REQUIRE( (aPoint.norm ( Point::L_1 ) == 6) );
REQUIRE( (aPoint.norm ( Point::L_infty ) == 3) );
REQUIRE( (normalized[0] == Approx( 0.801784)) );
REQUIRE( (normalized[1] == Approx( -0.267261)) );
REQUIRE( (normalized[2] == Approx( 0.534522)) );
REQUIRE( (normalized[3] == Approx( 0.0)) );
}

SECTION("PointVector Iterator")
Expand All @@ -107,19 +107,19 @@ TEST_CASE( "Point Vector Unit tests" )

CAPTURE(aPoint25);
CAPTURE(sum);
REQUIRE( sum == 300);
REQUIRE( (sum == 300) );
}

SECTION("Arithmetical Operators")
{
REQUIRE( (p1 + p2) == Point(6,6,6,6) );
REQUIRE( (p1 - p2) == Point(-4,-2,0,2) );
REQUIRE( (p1*2) == Point(2,4,6,8) );
REQUIRE( (2*p1) == Point(2,4,6,8) );
REQUIRE( (-p1) == Point(-1,-2,-3,-4) );
REQUIRE( p1.inf(p2) == Point(1,2,3,2) );
REQUIRE( p1.sup(p2) == Point(5,4,3,4) );
REQUIRE( p1.dot(p2) == 30 );
REQUIRE( ((p1 + p2) == Point(6,6,6,6)) );
REQUIRE( ((p1 - p2) == Point(-4,-2,0,2)) );
REQUIRE( ((p1*2) == Point(2,4,6,8)) );
REQUIRE( ((2*p1) == Point(2,4,6,8)) );
REQUIRE( ((-p1) == Point(-1,-2,-3,-4)) );
REQUIRE( (p1.inf(p2) == Point(1,2,3,2)) );
REQUIRE( (p1.sup(p2) == Point(5,4,3,4)) );
REQUIRE( (p1.dot(p2) == 30) );
}

}
Expand Down

0 comments on commit b60e93b

Please sign in to comment.