Skip to content

Commit

Permalink
add better error messages to C++ tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kytpbs committed Oct 11, 2024
1 parent 7149e43 commit 5d65f4c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,11 @@ TEST_F(CommandScheduleTest, CancelNextCommand) {

// only one of the commands should be canceled.
EXPECT_FALSE(scheduler.IsScheduled(&command1) &&
scheduler.IsScheduled(&command2));
scheduler.IsScheduled(&command2)) << "Both commands are running when only one should be";
// one of the commands shouldn't be canceled because the other one is canceled
// first
EXPECT_TRUE(scheduler.IsScheduled(&command1) ||
scheduler.IsScheduled(&command2));
scheduler.IsScheduled(&command2)) << "Both commands are canceled when only one should be";

scheduler.Run();
EXPECT_EQ(*counterPtr, 2);
Expand Down

0 comments on commit 5d65f4c

Please sign in to comment.