file_test_infoVTestFileMetaInfo// filled in by generated code, before .start() is called.
fn_test_infoVTestFnMetaInfo// filled in by generated code, before .fn_start() is called.
fn_assert_passesu64// reset this to 0 in .fn_start(), increase it in .assert_pass()
fn_passesu64// increase this in .fn_pass()
fn_failsu64// increase this in .fn_fails()
total_assert_passesu64// increase this in .assert_pass()
total_assert_failsu64// increase this in .assert_fail()
start(ntestsint)// called before all tests, you can initialise private data here. ntests is the number of test functions in the _test.v file.
finish()// called after all tests are finished, you can print some stats if you want here.
exit_code()int// called right after finish(), it should return the exit code, that the test program will exit with.
//
fn_start()bool// called before the start of each test_ function. Return false, if the function should be skipped.
fn_pass()// called after the end of each test_ function, with NO failed assertion.
fn_fail()// called after the end of each test_ function, with a failed assertion, *or* returning an error.
fn_error(line_nrint,filestring,modstring,fn_namestring,errmsgstring)// called only for `fn test_xyz() ? { return error('message') }`, before .fn_fail() is called.
//
assert_pass(i&VAssertMetaInfo)// called after each `assert true`.
assert_fail(i&VAssertMetaInfo)// called after each `assert false`.
//
free()// you should free all the private data of your runner here.
}
//
structVTestFileMetaInfo{
filestring
testsint
}
// vtest_new_filemetainfo will be called right before .start(ntests),
// to fill in the .file_test_info field of the runner interface.