zxul767 / lox

An interpreter for the Lox language
1 stars 0 forks source link

start feature tests for both `clox` and `jlox` #6

Open zxul767 opened 1 year ago

zxul767 commented 1 year ago

the idea is to have the same set of tests for both interpreters. each test should be a pair of input/output files. for example, the following program tests shadowing of global variables by local variables:

var i = 0;
{ var i = 1; println i; }
println i;

the expected output is:

0
1
zxul767 commented 1 year ago

marking as p0 because the risk of regressions is already too great given all the changes we've done beyond the original implementation in the book