Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
17
Task/Assertions/Lingo/assertions.lingo
Normal file
17
Task/Assertions/Lingo/assertions.lingo
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
-- in a movie script
|
||||
on assert (ok, message)
|
||||
if not ok then
|
||||
if not voidP(message) then _player.alert(message)
|
||||
abort -- exits from current call stack, i.e. also from the caller function
|
||||
end if
|
||||
end
|
||||
|
||||
-- anywhere in the code
|
||||
on test
|
||||
x = 42
|
||||
assert(x=42, "Assertion 'x=42' failed")
|
||||
put "this shows up"
|
||||
x = 23
|
||||
assert(x=42, "Assertion 'x=42' failed")
|
||||
put "this will never show up"
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue