From: David Kerkeslager Date: Sun, 31 Dec 2017 01:41:49 +0000 (-0500) Subject: Removed one more test using ternary comparison X-Git-Url: https://code.kerkeslager.com/?a=commitdiff_plain;h=61733d6070859e6a639ae4b34faec9aacca52a29;p=fur Removed one more test using ternary comparison --- diff --git a/examples/16_short_circuiting.fur b/examples/16_short_circuiting.fur index f70e7b9..cb7b959 100644 --- a/examples/16_short_circuiting.fur +++ b/examples/16_short_circuiting.fur @@ -1,24 +1,12 @@ -def return_zero() do - print('This should not print\n') - 2 -end - -def return_one() do - print('This should only print once.\n') - 1 -end - def return_true() do - print('This should print exactly twice.\n') + print('This should print exactly once.\n') true end def return_false() do - print('This should print exactly twice.\n') + print('This should also print exactly once.\n') false end -0 < return_one() < 2 -0 < 0 < return_zero() return_true() or return_true() return_false() and return_false() diff --git a/examples/16_short_circuiting.fur.stdout.txt b/examples/16_short_circuiting.fur.stdout.txt index 21ff499..3c28171 100644 --- a/examples/16_short_circuiting.fur.stdout.txt +++ b/examples/16_short_circuiting.fur.stdout.txt @@ -1,3 +1,2 @@ -This should only print once. -This should print exactly twice. -This should print exactly twice. +This should print exactly once. +This should also print exactly once.