I used xUnit in my development environment. Most tests are done directly against the developed pieces of code, very few from the user interface in the form of JWithATwist code. My tests have some degree of generality allowing refactoring, but are partly white box, tests of the actual code written. This means that a change or fault somewhere breaks a minimal amount of tests, and that a failing test clearly shows where the problem is located. Tests of lexer/parser/interpreter are separate and done with a minimal mock language set created for this specific purpose. If I had the requirement to exactly copy the J syntax I wouldn't have done it much differently. I would have run the J tests when my code could handle them, just to verify that everything was correct. My TDD "style" was to write tests of a functionality in complexity order, write the code for parts or all of the functionality and then correct failed tests in this complexity order. When the tests of the functionality passed I documented and did refactoring. I did not write one test at a time and then the functionality needed to pass this specific test, as I should according to TDD best practise. /Erling

Den 2017-12-14 kl. 12:27, skrev TongKe Xue:
Hi,


   I am writing a mini-J interpreter.

   Lexer appears to work fine. Dyad execution appears to be working (with
rank, frame, cell, padding, implemented.)

   Is there any order to
https://github.com/jsoftware/jsource/tree/master/test ?

   I'm looking for a resource where it is an ever increasing list of
"slightly more difficult unit tests" -- where writing an interpreter
becomes a game of passing ever more unit tests -- TDD-ing a J interpreter
so to speak.

   What is the easiest way I can turn
https://github.com/jsoftware/jsource/tree/master/test into a resource like
that?


--TongKe
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to