Saturday, March 01, 2008

New convention for unit tests

Until now, unit test files would define words in the temporary vocabulary. This made it problematic to run these words after the unit tests were done -- sometimes your tests failed, and to debug the problem you want to run some of these words, however the unit test code would forget everything in the temporary vocabulary, necessitating an annoying workflow where to access these words the test file had to be loaded with run-file first. I finally got fed up with this so I changed the convention: test files now define words in vocab.tests, not temporary, and these vocabularies are not forgotten after tests run. I've updated all tests in the repository; new code by contributors should no longer use the temporary vocab.

No comments: