init commit again
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
general {
|
||||
funcon-term:
|
||||
finalise-failing
|
||||
sequential(
|
||||
check-true(true), print 1,
|
||||
else(check-true(false), print 2),
|
||||
check-true(not false), print 3,
|
||||
print sequential(check-true(true),4)
|
||||
)
|
||||
;
|
||||
}
|
||||
|
||||
tests {
|
||||
result-term: null-value;
|
||||
standard-out: [1, 2, 3, 4];
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
general {
|
||||
funcon-term:
|
||||
finalise-failing
|
||||
sequential(
|
||||
effect(checked(true)), print 1,
|
||||
else(effect(checked()), print 2),
|
||||
else(effect(checked(map-lookup(map(),1))), print 3),
|
||||
print(checked(map-lookup(map(tuple(0,1),tuple(1,4)),1)))
|
||||
)
|
||||
;
|
||||
}
|
||||
|
||||
tests {
|
||||
result-term: null-value;
|
||||
standard-out: [1, 2, 3, 4];
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
general {
|
||||
funcon-term:
|
||||
finalise-failing
|
||||
sequential(
|
||||
effect(checked(42)), print 1,
|
||||
else(checked(sequential(print(2),lookup(map-empty,"x"))), print 3)
|
||||
)
|
||||
;
|
||||
}
|
||||
|
||||
tests {
|
||||
result-term: null-value;
|
||||
standard-out: [1, 2, 3];
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
general {
|
||||
funcon-term:
|
||||
finalise-failing finalise-abrupting
|
||||
sequential(
|
||||
else-choice(print 1),
|
||||
else-choice(fail, fail, fail, print 2, fail, print 3)
|
||||
)
|
||||
;
|
||||
}
|
||||
|
||||
tests {
|
||||
result-term: null-value;
|
||||
standard-out: [1, 2];
|
||||
// Also possible:
|
||||
// standard-out: [1, 3];
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
general {
|
||||
funcon-term:
|
||||
finalise-failing finalise-abrupting
|
||||
sequential(
|
||||
else(fail, print 1),
|
||||
print else(2, fail),
|
||||
else(print 3, fail),
|
||||
handle-abrupt(
|
||||
else(abrupt(true), print 99),
|
||||
print 4),
|
||||
else(fail, fail, print 5)
|
||||
)
|
||||
;
|
||||
}
|
||||
|
||||
tests {
|
||||
result-term: null-value;
|
||||
standard-out: [1, 2, 3, 4, 5];
|
||||
}
|
||||
Reference in New Issue
Block a user