More tests

This commit is contained in:
rocky
2015-12-27 16:49:37 -05:00
parent c508413689
commit 7c5b8d803c
52 changed files with 122 additions and 9 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -7,3 +7,86 @@ if True:
b = 1
else:
d = 2
a = 1
if a == 1:
a = 3
elif a == 2:
a = 4
if a == 1:
a = 5
elif a == 2:
a = 6
else:
a = 7
if a == 1:
a = 8
elif a == 7:
a = 9
elif a == 3:
a = 10
else:
a = 11
if a == 11:
a = 12
elif a == 12:
a = 13
elif a == 13:
a = 14
if a == 1:
b = 1
else:
if a == 2:
b = 2
else:
if a == 3:
b = 3
else:
b = 4
if a == 1:
a = 1
else:
if a == 2:
a = 2
else:
b = 3
if a == 3:
b = 4
else:
b = 5
if a == 1:
b = 1
else:
b = 2
if a == 2:
b = 3
else:
if a == 3:
b = 4
else:
b = 5
if a == 1:
b = 2
else:
b = 3
if a == 2:
b = 4
else:
b = 5
if a == 3:
b = 6
elif a == 4:
b = 7
elif a == 4:
b = 8
else:
b = 9

View File

@@ -0,0 +1,2 @@
globals()
locals()

View File

@@ -12,7 +12,4 @@
[ i for i in (1, 2, 3, 4) ]
[ i+1 for i in (1, 2, 3, 4) ]
# Try next:
# [ i * i for i in range(4) ]
# [ i * j for i in range(4) for j in range(7) ]
[ i * i for i in range(4) ]

View File

@@ -0,0 +1,22 @@
# Tests:
# Python2:
# assert_expr_and ::= assert_expr jmp_false expr
# and ::= expr jmp_false expr \e__come_from
# expr ::= list_compr
# list_iter ::= list_for
# list_for ::= expr _for designator list_iter JUMP_BACK
# list_iter ::= lc_body
# lc_body ::= expr LIST_APPEND
[b for b in (0,1,2,3)] if __name__ == '__main__' else 5
# Python2:
# list_compr ::= BUILD_LIST_0 list_iter
# list_iter ::= list_for
# list_for ::= expr _for designator list_iter JUMP_BACK
# list_iter ::= list_for
# list_for ::= expr _for designator list_iter JUMP_BACK
# list_iter ::= lc_body
# lc_body ::= expr LIST_APPEND
[ i * j for i in range(4) for j in range(7) ]

View File

@@ -1,5 +0,0 @@
# Tests:
# list_compr ::= BUILD_LIST_0 list_iter
# list_iter ::= list_for
# list_for ::= expr _for designator list_iter JUMP_BACK
[b for b in (0,1,2,3)] if True else 5

View File

@@ -0,0 +1 @@
a = 'True' if __name__ == '__main__' else False

View File

@@ -0,0 +1,13 @@
a = (1, 2, 3)
del a
b = [4, 5, 6]
del b[1]
del b[:]
c = [0,1,2,3,4]
del c[:1]
del c[2:3]
d = [0,1,2,3,4,5,6]
del d[1:3:2]