Skip to content

Commit

Permalink
sat: Fixup test
Browse files Browse the repository at this point in the history
  • Loading branch information
Mizux committed Sep 23, 2024
1 parent e55f003 commit 163685c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions ortools/sat/feasibility_jump_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ TEST(JumpTableTest, TestCachesCalls) {
[&](int) { return std::make_pair(++num_calls, -1.0); });
jumps.RecomputeAll(1);

EXPECT_EQ(jumps.GetJump(0), std::make_pair(1, -1.0));
EXPECT_EQ(jumps.GetJump(0), std::make_pair(1, -1.0));
EXPECT_EQ(jumps.GetJump(0), std::make_pair(int64_t{1}, -1.0));
EXPECT_EQ(jumps.GetJump(0), std::make_pair(int64_t{1}, -1.0));
EXPECT_EQ(num_calls, 1);
}

Expand All @@ -42,7 +42,7 @@ TEST(JumpTableTest, TestNeedsRecomputationOneVar) {
jumps.GetJump(0);
jumps.Recompute(0);

EXPECT_EQ(jumps.GetJump(0), std::make_pair(2, -1.0));
EXPECT_EQ(jumps.GetJump(0), std::make_pair(int64_t{2}, -1.0));
EXPECT_EQ(num_calls, 2);
}

Expand All @@ -57,8 +57,8 @@ TEST(JumpTableTest, TestNeedsRecomputationMultiVar) {
jumps.GetJump(1);
jumps.Recompute(0);

EXPECT_EQ(jumps.GetJump(0), std::make_pair(3, 0));
EXPECT_EQ(jumps.GetJump(1), std::make_pair(2, 1));
EXPECT_EQ(jumps.GetJump(0), std::make_pair(int64_t{3}, 0.0));
EXPECT_EQ(jumps.GetJump(1), std::make_pair(int64_t{2}, 1.0));
EXPECT_EQ(num_calls, 3);
}

Expand All @@ -84,7 +84,7 @@ TEST(JumpTableTest, TestSetJump) {

EXPECT_FALSE(jumps.NeedRecomputation(0));
EXPECT_GE(jumps.Score(0), 0);
EXPECT_EQ(jumps.GetJump(0), std::make_pair(1, 1.0));
EXPECT_EQ(jumps.GetJump(0), std::make_pair(int64_t{1}, 1.0));
EXPECT_EQ(num_calls, 0);
}

Expand Down

0 comments on commit 163685c

Please sign in to comment.