20 lines
321 B
Plaintext
20 lines
321 B
Plaintext
|
### 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
|
||
|
|
||
|
http://nim-lang.org/unittest.html[unittest]
|
||
|
|
||
|
### Functional and integration testing
|
||
|
|
||
|
### Code coverage
|
||
|
|