Skip to content

Commit

Permalink
Combine if test into if_elif_else (#136)
Browse files Browse the repository at this point in the history
  • Loading branch information
Akuli authored Jan 24, 2023
1 parent 4c7013b commit 961efb1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
9 changes: 0 additions & 9 deletions tests/should_succeed/if.jou

This file was deleted.

5 changes: 5 additions & 0 deletions tests/should_succeed/if_elif_else.jou
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ def foo(x: int) -> void:
printf(">\n")

def main() -> int:
if True:
printf("a\n") # Output: a
if False:
printf("b\n") # Warning: this code will never run

foo(12) # Output: <Big>
foo(15) # Output: <Big>
foo(5) # Output: <Five>
Expand Down

0 comments on commit 961efb1

Please sign in to comment.