RosettaCodeData/Task/Assertions/Liberty-BASIC/assertions.basic
2023-07-01 13:44:08 -04:00

14 lines
230 B
Text

a=42
call assert a=42
print "passed"
a=41
call assert a=42
print "failed (we never get here)"
end
sub assert cond
if cond=0 then 'simulate error, mentioning "AssertionFailed"
AssertionFailed(-1)=0
end if
end sub