From da53ba40405a6c4645e26bd5981f84d4349899de Mon Sep 17 00:00:00 2001 From: Alex Bethel Date: Sun, 13 Jun 2021 09:53:33 -0500 Subject: [PATCH] Improve pass-by-reference test --- able-script-test/pass-by-reference.able | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/able-script-test/pass-by-reference.able b/able-script-test/pass-by-reference.able index 2787104..5eb0b72 100644 --- a/able-script-test/pass-by-reference.able +++ b/able-script-test/pass-by-reference.able @@ -12,6 +12,14 @@ var bar = "world"; swap(foo, bar); -owo Should print "hello", then "world" -bar print; -foo print; +if (foo != "world") { + "FAILED" print; + "foo should be 'world', is actually:" print; + foo print; +} + +owo AbleScript doesn't have an `else` statement (yet), so we get to +owo check the reverse condition. +if (foo == "world") { + "OK" print; +}