slavapestov/factor — Issue #284: Test files that define additional words are hard to work with
Author: erg
Created: 2011-10-19 20:08:16+00:00
State: open

The math.vectors.simd vocabulary has a test file with path basis/math/vectors/simd/simd-tests.factor which defines the vocabulary "math.vectors.simd.tests". However, you cannot do "math.vectors.simd.tests" since this doesn't map to the actual tests file on disk.

Even if you could, unit-tests run as if they were top-level forms, so this file takes a minute to reload your code and run the tests.

A possible solution is to store unit tests and run them on demand instead of running them when the file is loaded. Also, mapping the tests vocabulary name to the tests file should be solved. Reloading a tests file should only reload the code and make a list of unit tests to run, while testing the file will do a reload and run those tests.