A few test cases were added for CASE
This commit is contained in:
parent
ab17d4c60e
commit
4253145383
|
@ -67,6 +67,20 @@ public class CASETester {
|
||||||
assertSExpressionsMatch(parseString("nil"), evaluateString(input));
|
assertSExpressionsMatch(parseString("nil"), evaluateString(input));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void caseWithSeveralItemsInKeyList_Match() {
|
||||||
|
String input = "(case :a ((:b :a) 'orange) ((:c :d) 'banana))";
|
||||||
|
|
||||||
|
assertSExpressionsMatch(parseString("orange"), evaluateString(input));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void caseWithSeveralItemsInKeyList_NoMatch() {
|
||||||
|
String input = "(case :a ((:b :f) 'orange) ((:c :d) 'banana))";
|
||||||
|
|
||||||
|
assertSExpressionsMatch(parseString("nil"), evaluateString(input));
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void caseWithSymbolicKeyList_Match() {
|
public void caseWithSymbolicKeyList_Match() {
|
||||||
String input = "(case :a (:a 'orange))";
|
String input = "(case :a (:a 'orange))";
|
||||||
|
|
Loading…
Reference in New Issue