Skip to content

Commit 01b981d

Browse files
committed
Update tests to new unsat assumptions tree
1 parent 16bb7e9 commit 01b981d

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

src/test/scala/smtlib/parser/CommandsResponsesParserTests.scala

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -287,13 +287,15 @@ class CommandsResponsesParserTests extends FunSuite {
287287
GetUnsatAssumptionsResponseSuccess(Seq()))
288288
}
289289

290-
test("get-unsat-assumptions response is a list of symbols") {
290+
test("get-unsat-assumptions response is a list of prop literals") {
291291
assert(Parser.fromString("(x)").parseGetUnsatAssumptionsResponse ===
292-
GetUnsatAssumptionsResponseSuccess(Seq(SSymbol("x"))))
293-
assert(Parser.fromString("(a c)").parseGetUnsatAssumptionsResponse ===
294-
GetUnsatAssumptionsResponseSuccess(Seq(SSymbol("a"), SSymbol("c"))))
295-
assert(Parser.fromString("(a b c d)").parseGetUnsatAssumptionsResponse ===
296-
GetUnsatAssumptionsResponseSuccess(Seq(SSymbol("a"), SSymbol("b"), SSymbol("c"), SSymbol("d"))))
292+
GetUnsatAssumptionsResponseSuccess(Seq(PropLiteral(SSymbol("x"), true))))
293+
assert(Parser.fromString("((not a) c)").parseGetUnsatAssumptionsResponse ===
294+
GetUnsatAssumptionsResponseSuccess(Seq(PropLiteral(SSymbol("a"), false), PropLiteral(SSymbol("c"), true))))
295+
assert(Parser.fromString("(a b (not c) d)").parseGetUnsatAssumptionsResponse ===
296+
GetUnsatAssumptionsResponseSuccess(Seq(
297+
PropLiteral(SSymbol("a"), true), PropLiteral(SSymbol("b"), true),
298+
PropLiteral(SSymbol("c"), false), PropLiteral(SSymbol("d"), true))))
297299
}
298300

299301
/*

src/test/scala/smtlib/printer/PrinterTests.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -450,10 +450,10 @@ It spans a couple lines""")))))
450450

451451
def printGetUnsatAssumptions(res: GetUnsatAssumptionsResponse): String = printer.toString(res)
452452
def parseGetUnsatAssumptions(in: String): GetUnsatAssumptionsResponse = Parser.fromString(in).parseGetUnsatAssumptionsResponse
453-
check(GetUnsatAssumptionsResponseSuccess(Seq(SSymbol("a"))),
453+
check(GetUnsatAssumptionsResponseSuccess(Seq(PropLiteral(SSymbol("a"), true))),
454454
printGetUnsatAssumptions, parseGetUnsatAssumptions)
455455
check(GetUnsatAssumptionsResponseSuccess(
456-
Seq(SSymbol("a"), SSymbol("b"))),
456+
Seq(PropLiteral(SSymbol("a"), true), PropLiteral(SSymbol("b"), false))),
457457
printGetUnsatAssumptions, parseGetUnsatAssumptions)
458458

459459
def printGetUnsatCore(res: GetUnsatCoreResponse): String = printer.toString(res)

0 commit comments

Comments
 (0)