aboutsummaryrefslogtreecommitdiff
path: root/v_windows/v/old/cmd/v/help/test.txt
blob: a49da9135b2344bb1b9e4e7375c607531ac3c836 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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.