source-academy / source-programs

Notable Source programs, developed for SICP JS and other educational projects
GNU General Public License v3.0
7 stars 18 forks source link

Test: test script doesn't capture some runtime error #31

Open tysg opened 4 years ago

tysg commented 4 years ago

grep will fail to capture runtime error like

Line 1798: Expected 2 arguments, but got 1.

and test cases with the above output is erroneously marked as PASSED.

tysg commented 4 years ago

In fact, src/evaluators/__tests__/source-2-lazy.test1.js uses parse_and_evaluate(stmt) which is not defined in the program at all. It should throw a runtime error.