Skip to content

Commit

Permalink
All_compare test: Expect "true" on single process (#3677)
Browse files Browse the repository at this point in the history
The all_compare test checks if all_compare correctly returns false if supplied with different values. This, however, only holds true if the test is called with more than one processes.
  • Loading branch information
kodiakhq[bot] authored Apr 21, 2020
2 parents 9d5c510 + 79851e5 commit ae36c6f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/utils/tests/all_compare_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ BOOST_AUTO_TEST_CASE(true_) {
BOOST_AUTO_TEST_CASE(false_) {
mpi::communicator world;

BOOST_CHECK(not all_compare(world, (world.rank() > 0) ? 42 : 41));
BOOST_CHECK(all_compare(world, (world.rank() > 0) ? 42 : 41) ==
(world.size() <= 1));
}

int main(int argc, char **argv) {
Expand Down

0 comments on commit ae36c6f

Please sign in to comment.