v2 / vlib / v / fmt / tests / consts_expected.vv
60 lines · 54 sloc · 1005 bytes · 2964855d1511583ae1bd9126cbf13f2e020aa964
Raw
1// pi
2// pi
3const pi = 3.14
4// phi
5// phi
6// phi
7const phi = 1.618
8// Euler's constant
9const eulers = 2.7182
10const supported_platforms = ['windows', 'macos', 'linux', 'freebsd', 'openbsd', 'netbsd', 'dragonfly',
11 'android', 'js', 'solaris', 'haiku']
12const one_line_supported = ['windows', 'macos', 'linux', 'freebsd', 'openbsd', 'netbsd', 'dragonfly',
13 'android', 'js', 'solaris', 'haiku']
14const another_const = ['a', 'b', 'c', 'd', 'e', 'f']
15const multiline_const = [
16 'first line',
17 'second line',
18 'third line',
19 'fourth line',
20]
21
22const i_am_a_very_long_constant_name_so_i_stand_alone_and_my_length_is_over_90_characters = [
23 'testforit',
24]
25
26pub const i_am_pub_const = true
27
28const abc = 1 // abc
29
30const def = 2 // def
31
32const ghi = 3 // ghi
33
34fn main() {
35 a := [
36 [3, 5, 6],
37 [7, 9, 2],
38 ]
39 b := [[
40 [2, 5, 8],
41 [5, 1, 3],
42 [2, 6, 0],
43 ], [
44 [9, 4, 5],
45 [7, 2, 3],
46 [1, 2, 3],
47 ]]
48 c := [
49 [
50 [2, 5, 8],
51 [5, 1, 3],
52 [2, 6, 0],
53 ],
54 [
55 [9, 4, 5],
56 [7, 2, 3],
57 [1, 2, 3],
58 ],
59 ]
60}
61