aboutsummaryrefslogtreecommitdiff
path: root/v_windows/v/old/cmd/tools/vvet/tests/module_file_test.vv
blob: f0f5b24057179a82be6d2721e98ce110413240f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
module foo

struct Foo {
	foo int
}

pub fn foo() string {
	// Missing doc
	return 'foo'
}

// foo does bar
pub fn bar() string {
	// not using convention style: '// <fn name>'
	return 'bar'
}

// fooo does x
pub fn fooo() string {
	// Documented
	return 'fooo'
}

// booo does x
fn booo() string {
	// Documented, but not pub
	return 'booo'
}

fn boo() string {
	// Missing doc
	return 'boo'
}

pub fn (f Foo) foo() string {
	// Missing doc
	return f.fo()
}

fn (f Foo) fo() string {
	// Missing doc, but not pub
	return 'foo'
}

// wrong doc
pub fn (f Foo) fooo() string {
	// not using convention
	return f.fo()
}

// boo
pub fn (f Foo) boo() string {
	// Incomplete doc
	return f.fo()
}