Builtin testing tool

Posted by yhuang
Public (Editable by Users)
// hello.v
fn hello() string {
	return 'Hello world'

// hello_test.v
fn test_hello() {
    assert hello() == 'Hello world'
// All test functions have to be placed in *_test.v files and begin with test_.
// To run the tests do v hello_test.v. To test an entire module, do v test mymodule.

// assert keyword can be used outside of tests as well.