int() bool() and str()
Some checks failed
Build / build (push) Successful in 9m45s
Test / build (push) Failing after 16m25s

This commit is contained in:
Chuck Smith
2024-03-21 15:19:48 -04:00
parent 43362475f9
commit d3471af03d
7 changed files with 138 additions and 3 deletions

View File

@@ -992,11 +992,11 @@ func TestBuiltins(t *testing.T) {
`,
expectedConstants: []interface{}{1},
expectedInstructions: []code.Instructions{
code.Make(code.OpGetBuiltin, 5),
code.Make(code.OpGetBuiltin, 7),
code.Make(code.OpArray, 0),
code.Make(code.OpCall, 1),
code.Make(code.OpPop),
code.Make(code.OpGetBuiltin, 8),
code.Make(code.OpGetBuiltin, 10),
code.Make(code.OpArray, 0),
code.Make(code.OpConstant, 0),
code.Make(code.OpCall, 2),
@@ -1007,7 +1007,7 @@ func TestBuiltins(t *testing.T) {
input: `fn() { return len([]) }`,
expectedConstants: []interface{}{
[]code.Instructions{
code.Make(code.OpGetBuiltin, 5),
code.Make(code.OpGetBuiltin, 7),
code.Make(code.OpArray, 0),
code.Make(code.OpCall, 1),
code.Make(code.OpReturn),