craftinginterpreters icon indicating copy to clipboard operation
craftinginterpreters copied to clipboard

Would there be some more flexible way to test third-party implementation ?

Open edimetia3d opened this issue 2 years ago • 1 comments

Hi,

I've implemented both clox and jlox in my GitHub Project after learning this great tutorial.

Like many other people, I've basically hand-typed everything and written the code with my own understanding, so my implementation is quite different from the "standard" implementation, especially in error detecting and error messaging.

To relieve me from testing, I used the unit tests from the upstream repo. However, the dart test tool is very strict in error-message checking, which makes it hard to leverage the test tool.

So I only make my clox implementation fully compatible with the upstream test cases.

For jlox, I created a Test Tool Fork, which only checks exit-code and stdout. Though it is simplified, it does help me to detect many errors.

So I was wondering if there would be some more flexible way to run the test?

Sincerely

edimetia3d avatar Feb 03 '22 12:02 edimetia3d

I don't think that's doable. To test my own implementation one of my collaborators wrote a testing framework entirely from scratch that can be configured in lox source files to match specific stdout, stderr and stdin (and even provide custom keyboard input)

nocturn9x avatar Feb 03 '22 12:02 nocturn9x