-
Notifications
You must be signed in to change notification settings - Fork 19
/
test_compare_1.py
executable file
·64 lines (51 loc) · 1.2 KB
/
test_compare_1.py
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
56
57
58
59
60
61
62
63
64
OntCversion = '2.0.0'
def Main():
lst = []
a = 4
b = 3
c = 5
d = 8
e = 8
x = 0
# first false.
if a < b < append_elt(lst, c) < append_elt(lst, d) >= append_elt(lst, e):
x = 1
assert(x == 0)
assert(len(lst) == 0)
# second false.
a = 2
lst = []
if a < b > append_elt(lst, c) > append_elt(lst, d) >= append_elt(lst, e):
x = 2
assert(len(lst) == 1)
assert(lst[0] == c)
assert(x == 0)
# third false
lst = []
if a < b < append_elt(lst, c) > append_elt(lst, d) >= append_elt(lst, e):
x = 3
assert(len(lst) == 2)
assert(lst[0] == c)
assert(lst[1] == d)
assert(x == 0)
# fourth false
lst = []
if a < b < append_elt(lst, c) < append_elt(lst, d) > append_elt(lst, e):
x = 4
assert(len(lst) == 3)
assert(lst[0] == c)
assert(lst[1] == d)
assert(lst[2] == e)
assert(x == 0)
# fifth ture
lst = []
if a < b < append_elt(lst, c) < append_elt(lst, d) >= append_elt(lst, e):
x = 5
assert(len(lst) == 3)
assert(lst[0] == c)
assert(lst[1] == d)
assert(lst[2] == e)
assert(x == 5)
def append_elt(lst, e):
lst.append(e)
return e