Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tests for array size and nested arrays #299

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions tests/fixtures/arrays/array_size_addition.rock
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Total is 0
Rock the result with 1000
Rock the result with 2000
Say the result
Say Total
Let Total be with the result
Let Total be with the result
Let Total be with the result
Say Total
3 changes: 3 additions & 0 deletions tests/fixtures/arrays/array_size_addition.rock.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
2
0
6
5 changes: 5 additions & 0 deletions tests/fixtures/arrays/array_size_substraction.rock
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Rock the result with 1000
Rock the result with 2000
The world is 15
Say the result
Say the result without the world
2 changes: 2 additions & 0 deletions tests/fixtures/arrays/array_size_substraction.rock.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
2
-13
6 changes: 6 additions & 0 deletions tests/fixtures/arrays/nested_array.rock
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Rock the result with 1000
Rock the result with 2000
Rock Thing with the result
Let Other be Thing at 0
Say Other
Say Other at 1
2 changes: 2 additions & 0 deletions tests/fixtures/arrays/nested_array.rock.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
2
2000