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