Skip to content

Commit 6c7ccb3

Browse files
committed
simplify tests and avoid some unneeded construction of lists.
1 parent cfbe23f commit 6c7ccb3

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

src/org/sosy_lab/java_smt/solvers/cvc4/CVC4NativeAPITest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
import static com.google.common.truth.Truth.assertThat;
1212
import static org.junit.Assert.assertThrows;
1313

14-
import com.google.common.collect.ImmutableList;
1514
import edu.stanford.CVC4.ArrayType;
1615
import edu.stanford.CVC4.BitVector;
1716
import edu.stanford.CVC4.BitVectorType;
@@ -766,7 +765,7 @@ public void checkUnsatCore() {
766765

767766
// UnsatCores are iterable
768767
for (Expr e : unsatCore) {
769-
assertThat(e.toString()).isIn(ImmutableList.of("(not (or a b))", "(and a b)"));
768+
assertThat(e.toString()).isAnyOf("(not (or a b))", "(and a b)");
770769
}
771770
}
772771

src/org/sosy_lab/java_smt/solvers/cvc5/CVC5NativeAPITest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
import static org.junit.Assert.assertThrows;
1313

1414
import com.google.common.base.Preconditions;
15-
import com.google.common.collect.ImmutableList;
1615
import io.github.cvc5.CVC5ApiException;
1716
import io.github.cvc5.Kind;
1817
import io.github.cvc5.Op;
@@ -1031,7 +1030,7 @@ public void checkUnsatCore() {
10311030

10321031
// UnsatCores are iterable
10331032
for (Term e : unsatCore) {
1034-
assertThat(e.toString()).isIn(ImmutableList.of("(not (or a b))", "(and a b)"));
1033+
assertThat(e.toString()).isAnyOf("(not (or a b))", "(and a b)");
10351034
}
10361035
}
10371036

src/org/sosy_lab/java_smt/test/ModelTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -856,7 +856,7 @@ public void testPartialModelsUF() throws SolverException, InterruptedException {
856856
assume()
857857
.withMessage("As of now, only Z3 supports partial model evaluation")
858858
.that(solver)
859-
.isIn(ImmutableList.of(Solvers.Z3));
859+
.isEqualTo(Solvers.Z3);
860860
try (ProverEnvironment prover = context.newProverEnvironment(ProverOptions.GENERATE_MODELS)) {
861861
IntegerFormula x = imgr.makeVariable("x");
862862
IntegerFormula f = fmgr.declareAndCallUF("f", IntegerType, x);

0 commit comments

Comments
 (0)