Skip to content

Commit aecb3b7

Browse files
committed
Forth: additional tests for "combined arithmetic" category
This will ensure that students are popping numbers off the correct end of the stack (for languages without a builtin Stack type).
1 parent 2437c59 commit aecb3b7

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

exercises/forth/canonical-data.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,24 @@
213213
"instructions": ["2 4 * 3 /"]
214214
},
215215
"expected": [2]
216+
},
217+
{
218+
"uuid": "",
219+
"description": "multiplication and addition",
220+
"property": "evaluate",
221+
"input": {
222+
"instructions": ["1 3 4 * +"]
223+
},
224+
"expected": [13]
225+
},
226+
{
227+
"uuid": "",
228+
"description": "addition and multiplication",
229+
"property": "evaluate",
230+
"input": {
231+
"instructions": ["1 3 4 + *"]
232+
},
233+
"expected": [7]
216234
}
217235
]
218236
},

0 commit comments

Comments
 (0)