Project

General

Profile

Tester and Notester

Added by skvery about 1 month ago

[[Notester|https://bitbucket.org/skvery/mecrisp/src/5d5103e9ad443412f87017c73841120d010a5ae3/fuct/notester.fs?at=master]]

and

[[Notester|https://bitbucket.org/skvery/mecrisp/src/5d5103e9ad443412f87017c73841120d010a5ae3/fuct/tester.fs?at=master]]

might be useful in debugging and documenting usage of words?

See source for acknowledgements...

Simple tests can be coded as follows. If notester.fs is included these snippets are comments only.

t{ 1 1 + -> 2 }t


Replies (1)

RE: Tester and Notester - Added by tve about 1 month ago

I've been using a slightly different convention, which is a foo-test.fs file to test foo.fs. This way the source included by other stuff doesn't have tons of test lines that need to be transmitted. Also, this makes it easier to mess with the test environment. For example, I use a mocking and stubbing library. This means that to run tests I need to set-up the environment correctly before loading the module under test.

    (1-1/1)