nim-wiki/Testing.asciidoc

27 lines
504 B
Plaintext
Raw Normal View History

2015-04-22 12:57:33 +00:00
### General testing tips
Define a "testing" conditional symbol at compile time: nim --define:testing main.nim
``` Nim
when defined(testing):
# testing-related code
else:
# production code
```
### Unit testing
2016-05-26 15:44:32 +00:00
Use http://nim-lang.org/docs/unittest.html[unittest]
2015-04-22 12:57:33 +00:00
### Functional and integration testing
2015-04-22 12:58:34 +00:00
TODO
2015-04-22 12:57:33 +00:00
### Code coverage
2015-06-28 12:29:42 +00:00
Try to test every path of execution in your softwares. That is the key to maximizing your code coverages.
2016-07-05 15:48:00 +00:00
https://github.com/yglukhov/coverage[Coverage library]
2015-04-22 12:58:34 +00:00
TODO