Skip to content

Commit

Permalink
fixup test_map_location.cpp
Browse files Browse the repository at this point in the history
Was checking vector sum commutativity twice, replaced with an
anticommutativity test for vector_difference.
  • Loading branch information
cbeck88 committed May 18, 2014
1 parent 42ce06b commit d0c7e9b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/tests/test_map_location.cpp
Expand Up @@ -48,7 +48,11 @@ static void characterization_distance_direction (const std::vector<map_location>
//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
}
Expand Down

0 comments on commit d0c7e9b

Please sign in to comment.