!752 !include #1005190 // Prolog Native Stuff sS trueStuff = [=[ ["oops" starts with "oo"] ]=]; sS falseStuff = [=[ ["poopoo" starts with "oopoop"] ]=]; p { new Prolog p; p.addNatives(new StartsWith, new EndsWith); prolog_checkTrueStuff(p, trueStuff); prolog_checkFalseStuff(p, falseStuff); print("ok!"); } static void prolog_checkTrueStuff(Prolog p, S data) { for (Lisp s : p.parseStatements(data)) { print("Checking TRUE: " + nlUnparse(s)); assertTrue(p.canSolve(s)); } } static void prolog_checkFalseStuff(Prolog p, S data) { for (Lisp s : p.parseStatements(data)) { print("Checking FALSE: " + nlUnparse(s)); assertFalse(p.canSolve(s)); } }