Debian Codegraph @

tests/languages/wgsl/literal_feature.test

raw
1 0x123
2 0X123u
3 1u
4 123
5 0
6 0i
7 0x3f
8
9 0.e+4f
10 01.
11 .01
12 12.34
13 .0f
14 0h
15 1e-3
16 0xa.fp+2
17 0x1P+4f
18 0X.3
19 0x3p+2h
20 0X1.fp-4
21 0x3.2p+2h
22
23 true
24 false
25
26 notALiteral20x3f
27
28 ----------------------------------------------------
29
30 [
31 ["hex-int-literal", "0x123"],
32 ["hex-int-literal", "0X123u"],
33 ["int-literal", "1u"],
34 ["int-literal", "123"],
35 ["int-literal", "0"],
36 ["int-literal", "0i"],
37 ["hex-int-literal", "0x3f"],
38
39 ["decimal-float-literal", "0.e+4f"],
40 ["decimal-float-literal", "01."],
41 ["decimal-float-literal", ".01"],
42 ["decimal-float-literal", "12.34"],
43 ["decimal-float-literal", ".0f"],
44 ["decimal-float-literal", "0h"],
45 ["decimal-float-literal", "1e-3"],
46 ["hex-float-literal", "0xa.fp+2"],
47 ["hex-float-literal", "0x1P+4f"],
48 ["hex-float-literal", "0X.3"],
49 ["hex-float-literal", "0x3p+2h"],
50 ["hex-float-literal", "0X1.fp-4"],
51 ["hex-float-literal", "0x3.2p+2h"],
52
53 ["bool-literal", "true"],
54 ["bool-literal", "false"],
55
56 "\r\n\r\nnotALiteral20x3f"
57 ]