mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
19 lines
792 B
Plaintext
19 lines
792 B
Plaintext
Usage:
|
|
v [-stats] test FILE|DIRECTORY[...]
|
|
Runs test functions in the given FILEs and DIRECTORYs
|
|
|
|
If '-stats' is given, more statistics about the tests are printed along
|
|
with a report of passes/failures
|
|
|
|
NB 1: very frequently, when you work on a module you can cd into its folder,
|
|
and then you can perform:
|
|
v test .
|
|
... to run all the module's '_test.v' files.
|
|
|
|
NB 2: V builtin testing requires you to name your files with a _test.v
|
|
suffix, and to name your test functions with test_ prefix. Each 'test_'
|
|
function in a '_test.v' file will be called automatically by the test
|
|
framework. You can use `assert condition` inside each 'test_' function.
|
|
If the asserted condition fails, then v will record that and produce a
|
|
more detailed error message about where the failure was.
|