Warning: session_start(): open(/var/lib/php/sessions/sess_6bu66quv53hd06b9fua6s8m5k6, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
!7
p-exp {
assertEmpty(checkRule([[ true ]], true));
L l = checkRule([[ false ]], false);
assertEqualsVerbose(1, l(l));
l = checkRule(
[[
true && eval(true) && eval(false) && true => o(ok)
]], false);
// TODO
}
static L checkRule(S rule, final bool shouldSucceed) {
print("\n" + rule);
NLLogicChecker_v2 c = nlLogicCheckerWithRules(rule);
new NLLogicChecker_v2.Matching m;
m.verbose = true;
final new Flag succeeded;
final new L remaining;
nlLogic_iterate_withOnFail(c, first(c.rules).in, m, r {
if (!shouldSucceed) fail("Should not succeed");
succeeded.raise();
}, voidfunc(Exp e) {
remaining.add(e);
print("Remaining expression: " + e);
});
if (shouldSucceed && !succeeded.isUp())
fail("Rule failed");
ret remaining;
}