LOAD assert needs to be on 3.x...

Expand testing
This commit is contained in:
rocky
2018-03-26 18:11:57 -04:00
parent 1afe1fd943
commit 3d218c84b0
8 changed files with 25 additions and 1 deletions

View File

@@ -41,14 +41,17 @@ check-3.1: check-bytecode
#: Run working tests from Python 3.2
check-3.2: check-bytecode
$(PYTHON) test_pythonlib.py --bytecode-3.2 --weak-verify $(COMPILE)
$(PYTHON) test_pythonlib.py --bytecode-3.2-run --verify-run
#: Run working tests from Python 3.3
check-3.3: check-bytecode
$(PYTHON) test_pythonlib.py --bytecode-3.3 --weak-verify $(COMPILE)
$(PYTHON) test_pythonlib.py --bytecode-3.3-run --verify-run
#: Run working tests from Python 3.4
check-3.4: check-bytecode check-3.4-ok check-2.7-ok
$(PYTHON) test_pythonlib.py --bytecode-3.4 --weak-verify $(COMPILE)
$(PYTHON) test_pythonlib.py --bytecode-3.4-run --verify-run
#: Run working tests from Python 3.5
check-3.5: check-bytecode
@@ -202,6 +205,7 @@ check-bytecode-3.1:
#: Check deparsing Python 3.2
check-bytecode-3.2:
$(PYTHON) test_pythonlib.py --bytecode-3.2 --weak-verify
$(PYTHON) test_pythonlib.py --bytecode-3.2-run --verify-run
#: Check deparsing Python 3.3
check-bytecode-3.3:

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -1,3 +1,7 @@
# RUNNABLE!
# But if it miscompiles one of the tests may loop forever
# Tests:
# 2.7:
# assert ::= assert_expr jmp_true LOAD_ASSERT RAISE_VARARGS_1
@@ -16,7 +20,7 @@ for method_name in ['a']:
if method_name in ('b',):
method = 'a'
else:
assert 0, "instance installed"
assert True, "instance installed"
methods = 'b'
@@ -25,5 +29,17 @@ for method_name in ['a']:
# if not not do_setlocal:
# raise AssertError
# Hmmm.. this isn't strickly a bug
def getpreferredencoding(do_setlocale=True):
assert not do_setlocale
getpreferredencoding(False)
# From python 3.3 idlelib/PyParse.py
def _study1(i):
while i:
assert i
continue
_study1(False)

View File

@@ -123,6 +123,7 @@ class Python3Parser(PythonParser):
stmt ::= classdefdeco
classdefdeco ::= classdefdeco1 store
expr ::= LOAD_ASSERT
assert ::= assert_expr jmp_true LOAD_ASSERT RAISE_VARARGS_1 COME_FROM
assert_expr ::= expr

View File

@@ -31,6 +31,9 @@ class Python34Parser(Python33Parser):
expr ::= LOAD_ASSERT
# passtmt is needed for semantic actions to add "pass"
suite_stmts_opt ::= pass
# Seems to be needed starting 3.4.4 or so
while1stmt ::= SETUP_LOOP l_stmts
COME_FROM JUMP_BACK POP_BLOCK COME_FROM_LOOP