Toxaris / pts

Interpreter for functional pure type systems.
BSD 3-Clause "New" or "Revised" License
21 stars 7 forks source link

Run assertions as tests #54

Closed Toxaris closed 11 years ago

Toxaris commented 11 years ago

This adresses #48: At testing time, examples/Arithmetics.lpts is read, and each assertion in that file is treated as a separate test case. Try it by changing one of the assertions so that it fails and running cabal test or dist/build/tests/tests.

I see two problems with this code: (1) The implementation is insane. (2) The reaction to errors in file Arithmetics.lpts but outside any assertion is not optimal.

Comments?

Toxaris commented 11 years ago

I decided to merge this, because I want the extra unit tests for some other refactorings I intend to to. We can improve the sanity of the implementation (that is, avoid non-standard interactions between the various monad transformers in the stack) later, if we feel the need.