module support
This commit is contained in:
@@ -1031,6 +1031,18 @@ func TestIteration(t *testing.T) {
|
||||
runCompilerTests(t, tests)
|
||||
}
|
||||
|
||||
func TestImportExpressions(t *testing.T) {
|
||||
tests := []compilerTestCase2{
|
||||
{
|
||||
input: `import("foo")`,
|
||||
constants: []interface{}{"foo"},
|
||||
instructions: "0000 OpConstant 0\n0003 OpLoadModule\n0004 OpPop\n",
|
||||
},
|
||||
}
|
||||
|
||||
runCompilerTests2(t, tests)
|
||||
}
|
||||
|
||||
func runCompilerTests(t *testing.T, tests []compilerTestCase) {
|
||||
t.Helper()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user