From: Ouyancheng <1024842937@qq.com> Date: Wed, 22 Sep 2021 19:52:44 +0000 (-0700) Subject: Fix solver_black unit test (#7233) X-Git-Tag: cvc5-1.0.0~1181 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f9fd2f7a1e37540c0ac6a9ef33f9da91f69a8368;p=cvc5.git Fix solver_black unit test (#7233) In file `test/unit/api/solver_black.cpp` line 1499, `for (const std::pair& t : dmap)` is not the correct way of iterating through the element pairs, it should be `for (const std::pair& t : dmap)` as the keys are immutable. This triggers a warning on LLVM clang 12.0.1 (not AppleClang) on macOS. --- diff --git a/test/unit/api/solver_black.cpp b/test/unit/api/solver_black.cpp index fe8cf87ba..63556fa8a 100644 --- a/test/unit/api/solver_black.cpp +++ b/test/unit/api/solver_black.cpp @@ -1496,7 +1496,7 @@ TEST_F(TestApiBlackSolver, getDifficulty3) std::map dmap; ASSERT_NO_THROW(dmap = d_solver.getDifficulty()); // difficulty should map assertions to integer values - for (const std::pair& t : dmap) + for (const std::pair& t : dmap) { ASSERT_TRUE(t.first == f0 || t.first == f1); ASSERT_TRUE(t.second.getKind() == CONST_RATIONAL);