Skip to content

Commit d7e4f5a

Browse files
committed
test: add test cases for jlox resolving stages
Add test cases for resolving implementation in different stages of the jlox interpreter, covering in-progress and completed resolving scenarios
1 parent 04a6e8b commit d7e4f5a

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

internal/stages_test.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,20 @@ func TestStages(t *testing.T) {
7575
StdoutFixturePath: "./test_helpers/fixtures/pass_functions_final",
7676
NormalizeOutputFunc: normalizeTesterOutput,
7777
},
78+
"pass_resolving_inprogress_jlox": {
79+
StageSlugs: []string{"r1", "r2", "r3", "r4", "r5", "r6", "r7"},
80+
CodePath: "../craftinginterpreters/build/gen/chap11_resolving",
81+
ExpectedExitCode: 0,
82+
StdoutFixturePath: "./test_helpers/fixtures/pass_resolving",
83+
NormalizeOutputFunc: normalizeTesterOutput,
84+
},
85+
"pass_resolving_completed_jlox": {
86+
StageSlugs: []string{"r1", "r2", "r3", "r4", "r5", "r6", "r7"},
87+
CodePath: "../craftinginterpreters/build/gen/chap13_inheritance",
88+
ExpectedExitCode: 0,
89+
StdoutFixturePath: "./test_helpers/fixtures/pass_resolving_final",
90+
NormalizeOutputFunc: normalizeTesterOutput,
91+
},
7892
}
7993

8094
tester_utils_testing.TestTesterOutput(t, testerDefinition, testCases)

0 commit comments

Comments
 (0)