-
Notifications
You must be signed in to change notification settings - Fork 6
/
assert.txt
53 lines (42 loc) · 1.36 KB
/
assert.txt
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
================================================================================
assert statements
================================================================================
assert x > 1
--------------------------------------------------------------------------------
(module
(assert_stmt
(comparison_expr
(identifier)
(integer))))
================================================================================
assert statements with error message
================================================================================
assert a == b, "SOS"
--------------------------------------------------------------------------------
(module
(assert_stmt
(comparison_expr
(identifier)
(identifier))
(string
(string_start)
(string_content)
(string_end))))
================================================================================
assert statements with if guard and error message
================================================================================
assert a == b if c is not None, "SOS"
--------------------------------------------------------------------------------
(module
(assert_stmt
(comparison_expr
(identifier)
(identifier))
(comparison_expr
(identifier)
(unary_expr
(none)))
(string
(string_start)
(string_content)
(string_end))))