v / cmd / tools / vdoc / testdata / run_examples_good / main.v
10 lines · 9 sloc · 264 bytes · 8eaaba6094456bb21833fddf20d22514e7dadcb2
Raw
1// abc just prints 'xyz'. The important thing however is the next line, that does an assertion,
2// that should be executed with `v doc -run-examples good.v`, and should succeed:
3// Example: assert 5 * 5 == 25
4pub fn abc() {
5 println('xyz')
6}
7
8fn main() {
9 abc()
10}
11