Skip to content

Commit

Permalink
test: add additional test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
saig0 committed Jun 24, 2022
1 parent 7ef5c55 commit 621d7fd
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -185,12 +185,24 @@ class InterpreterUnaryTest
it should "compare to a conjunction (and)" in {
evalUnaryTests(true, "true and true") shouldBe ValBoolean(true)
evalUnaryTests(true, "false and true") shouldBe ValBoolean(false)

evalUnaryTests(true, "true and null") shouldBe ValBoolean(false)
evalUnaryTests(true, "false and null") shouldBe ValBoolean(false)

evalUnaryTests(true, """true and "otherwise" """") shouldBe ValBoolean(false)
evalUnaryTests(true, """false and "otherwise" """") shouldBe ValBoolean(false)
}

it should "compare to a disjunction (or)" in {
evalUnaryTests(true, "true or true") shouldBe ValBoolean(true)
evalUnaryTests(true, "false or true") shouldBe ValBoolean(true)
evalUnaryTests(true, "false or false") shouldBe ValBoolean(false)

evalUnaryTests(true, "true or null") shouldBe ValBoolean(true)
evalUnaryTests(true, "false or null") shouldBe ValBoolean(false)

evalUnaryTests(true, """true or "otherwise" """") shouldBe ValBoolean(true)
evalUnaryTests(true, """false or "otherwise" """") shouldBe ValBoolean(false)
}

"A date" should "compare with '<'" in {
Expand Down

0 comments on commit 621d7fd

Please sign in to comment.