Toxaris / pts

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

Automatically check assertions in examples #48

Closed Toxaris closed 11 years ago

Toxaris commented 11 years ago

In 1ed3eaef2c71116ee6d06bfe0aaba03b238d1d70, I added an example file that is full of assertions. I plan to have more files like this to check other aspects of the language. We can check the assertions as follows:

pts -iexamples --literate --quiet Arithmetics.lpts

This check should be automated. As a first step, maybe we can just add the call above to allTests.hs?

But a better solution would be to write a haskell function processFileAsTests :: FilePath -> Test that interpretes each assertion as a subtest, so that they are reported individually.

Toxaris commented 11 years ago

More specifically, the existing PTS.File.processFile should expose a hook to customize the processing of assertions.