Skip to content

Commit

Permalink
add arithmetic tests for "more than two values on the stack"
Browse files Browse the repository at this point in the history
  • Loading branch information
glennj committed Sep 23, 2024
1 parent 6856f08 commit 0efd027
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions exercises/forth/canonical-data.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,15 @@
"expected": {
"error": "only one value on the stack"
}
},
{
"uuid": "1e07a098-c5fa-4c66-97b2-3c81205dbc2f",
"description": "more than two values on the stack",
"property": "evaluate",
"input": {
"instructions": ["1 2 3 +"]
},
"expected": [1, 5]
}
]
},
Expand Down Expand Up @@ -98,6 +107,15 @@
"expected": {
"error": "only one value on the stack"
}
},
{
"uuid": "2c8cc5ed-da97-4cb1-8b98-fa7b526644f4",
"description": "more than two values on the stack",
"property": "evaluate",
"input": {
"instructions": ["1 12 3 -"]
},
"expected": [1, 9]
}
]
},
Expand Down Expand Up @@ -134,6 +152,15 @@
"expected": {
"error": "only one value on the stack"
}
},
{
"uuid": "5cd085b5-deb1-43cc-9c17-6b1c38bc9970",
"description": "more than two values on the stack",
"property": "evaluate",
"input": {
"instructions": ["1 2 3 *"]
},
"expected": [1, 6]
}
]
},
Expand Down Expand Up @@ -190,6 +217,15 @@
"expected": {
"error": "only one value on the stack"
}
},
{
"uuid": "f224f3e0-b6b6-4864-81de-9769ecefa03f",
"description": "more than two values on the stack",
"property": "evaluate",
"input": {
"instructions": ["1 12 3 /"]
},
"expected": [1, 4]
}
]
},
Expand Down

0 comments on commit 0efd027

Please sign in to comment.