Skip to content

Commit

Permalink
Add test case for if.
Browse files Browse the repository at this point in the history
Signed-off-by: Lan Liang <gcslyp@gmail.com>
  • Loading branch information
liangyuanpeng committed Jun 17, 2024
1 parent 33629fd commit 2869f29
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/grammar/if/if_stmt/test_5/main.k
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
_nodes=[]

_count = 3
if _count == 3:
print("The value of a is", _count)
elif _count == 5:
_nodes+=[]

nodes=_nodes
2 changes: 2 additions & 0 deletions test/grammar/if/if_stmt/test_5/stdout.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
The value of a is 3
nodes: []

0 comments on commit 2869f29

Please sign in to comment.