Merge branch 'forth_test' into 'master'

forth: add test and fix solution

See merge request slon/shad-go-private!75
This commit is contained in:
Fedor Korotkiy 2023-02-24 20:10:33 +00:00
commit 46e4498e1c

View file

@ -244,6 +244,11 @@ var testCases = []testCase{
input: []string{": SWAP DUP Dup dup ;", "1 swap"}, input: []string{": SWAP DUP Dup dup ;", "1 swap"},
expected: []int{1, 1, 1, 1}, expected: []int{1, 1, 1, 1},
}, },
{
description: "redefine of builtin after define user function on it",
input: []string{": foo dup ;", ": dup 1 ;", "2 foo"},
expected: []int{2, 2},
},
} }
func TestEval(t *testing.T) { func TestEval(t *testing.T) {