From d0c7e9b6f6af8785a015d7f5ad12c1163da6703b Mon Sep 17 00:00:00 2001 From: Chris Beck Date: Sat, 17 May 2014 19:51:31 -0400 Subject: [PATCH] fixup test_map_location.cpp Was checking vector sum commutativity twice, replaced with an anticommutativity test for vector_difference. --- src/tests/test_map_location.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/tests/test_map_location.cpp b/src/tests/test_map_location.cpp index 4fbf637e25b8..9a96d0c6b0f7 100644 --- a/src/tests/test_map_location.cpp +++ b/src/tests/test_map_location.cpp @@ -48,7 +48,11 @@ static void characterization_distance_direction (const std::vector //TODO: Investigate why this is not a valid assertion. //BOOST_CHECK_EQUAL( map_location::get_opposite_dir(expected_dir), b.get_relative_dir(a) ); BOOST_CHECK_EQUAL( a.vector_sum(b), b.vector_sum(a)); - BOOST_CHECK_EQUAL( a.vector_sum(b), b.vector_sum(a)); + map_location temp1 = a; + temp1.vector_difference_assign(b); + map_location temp2 = b; + temp2.vector_difference_assign(a); + BOOST_CHECK_EQUAL( temp1, temp2.vector_negation()); BOOST_CHECK_EQUAL( a, a.vector_negation().vector_negation()); #endif }