1992-11-27 22:54:49 +00:00
|
|
|
test_grammar
|
|
|
|
1. Parser
|
|
|
|
1.1 Tokens
|
|
|
|
1.1.1 Backslashes
|
|
|
|
1.1.2 Numeric literals
|
|
|
|
1.1.2.1 Plain integers
|
|
|
|
1.1.2.2 Long integers
|
|
|
|
1.1.2.3 Floating point
|
1993-11-11 10:31:23 +00:00
|
|
|
1.1.3 String literals
|
1992-11-27 22:54:49 +00:00
|
|
|
1.2 Grammar
|
|
|
|
single_input
|
|
|
|
file_input
|
|
|
|
expr_input
|
|
|
|
eval_input
|
|
|
|
funcdef
|
|
|
|
simple_stmt
|
|
|
|
expr_stmt
|
|
|
|
print_stmt
|
|
|
|
1 2 3
|
|
|
|
1 2 3
|
|
|
|
1 1 1
|
|
|
|
del_stmt
|
|
|
|
pass_stmt
|
|
|
|
flow_stmt
|
|
|
|
break_stmt
|
|
|
|
continue_stmt
|
|
|
|
return_stmt
|
|
|
|
raise_stmt
|
|
|
|
import_stmt
|
|
|
|
global_stmt
|
1993-10-22 14:24:22 +00:00
|
|
|
exec_stmt
|
1992-11-27 22:54:49 +00:00
|
|
|
if_stmt
|
|
|
|
while_stmt
|
|
|
|
for_stmt
|
|
|
|
try_stmt
|
|
|
|
suite
|
|
|
|
test
|
|
|
|
comparison
|
|
|
|
binary mask ops
|
|
|
|
shift ops
|
|
|
|
additive ops
|
|
|
|
multiplicative ops
|
|
|
|
unary ops
|
|
|
|
selectors
|
|
|
|
atoms
|
|
|
|
classdef
|
|
|
|
test_opcodes
|
|
|
|
2. Opcodes
|
|
|
|
XXX Not yet fully implemented
|
|
|
|
2.1 try inside for loop
|
|
|
|
test_operations
|
|
|
|
3. Operations
|
|
|
|
XXX Not yet implemented
|
|
|
|
test_builtin
|
|
|
|
4. Built-in functions
|
|
|
|
test_b1
|
1994-12-30 17:17:46 +00:00
|
|
|
__import__
|
1992-11-27 22:54:49 +00:00
|
|
|
abs
|
|
|
|
apply
|
1994-11-10 22:25:26 +00:00
|
|
|
callable
|
1992-11-27 22:54:49 +00:00
|
|
|
chr
|
|
|
|
cmp
|
|
|
|
coerce
|
1994-11-10 22:25:26 +00:00
|
|
|
compile
|
|
|
|
delattr
|
1992-11-27 22:54:49 +00:00
|
|
|
dir
|
|
|
|
divmod
|
|
|
|
eval
|
|
|
|
execfile
|
* string.py: added rindex(), rfind(); changed index() to interpret
negative start indices starting from the right.
* ftplib.py: debug() -> set_debuglevel(); change demo to use __init__().
* os.py: added execl, execlp, and execvp.
* lambda.py: removed (now that we have built-in map, reduce, bagof, lambda)
* test_b{1,2}.py, testall.out: added tests for bagof, lambda, map, reduce
* commands.py: use os, not posix
* test_grammar.py: make it easy to disable non-portable int overflow tests
* dis.py: don't abuse range()
1993-11-08 15:05:21 +00:00
|
|
|
filter
|
1992-11-27 22:54:49 +00:00
|
|
|
float
|
|
|
|
getattr
|
1994-11-10 22:25:26 +00:00
|
|
|
hasattr
|
|
|
|
hash
|
1992-11-27 22:54:49 +00:00
|
|
|
hex
|
1994-11-10 22:25:26 +00:00
|
|
|
id
|
1992-11-27 22:54:49 +00:00
|
|
|
int
|
|
|
|
len
|
|
|
|
long
|
* string.py: added rindex(), rfind(); changed index() to interpret
negative start indices starting from the right.
* ftplib.py: debug() -> set_debuglevel(); change demo to use __init__().
* os.py: added execl, execlp, and execvp.
* lambda.py: removed (now that we have built-in map, reduce, bagof, lambda)
* test_b{1,2}.py, testall.out: added tests for bagof, lambda, map, reduce
* commands.py: use os, not posix
* test_grammar.py: make it easy to disable non-portable int overflow tests
* dis.py: don't abuse range()
1993-11-08 15:05:21 +00:00
|
|
|
map
|
1992-11-27 22:54:49 +00:00
|
|
|
max
|
|
|
|
min
|
|
|
|
test_b2
|
|
|
|
oct
|
|
|
|
open
|
|
|
|
ord
|
|
|
|
pow
|
|
|
|
range
|
|
|
|
input and raw_input
|
|
|
|
testing
|
|
|
|
testing
|
* string.py: added rindex(), rfind(); changed index() to interpret
negative start indices starting from the right.
* ftplib.py: debug() -> set_debuglevel(); change demo to use __init__().
* os.py: added execl, execlp, and execvp.
* lambda.py: removed (now that we have built-in map, reduce, bagof, lambda)
* test_b{1,2}.py, testall.out: added tests for bagof, lambda, map, reduce
* commands.py: use os, not posix
* test_grammar.py: make it easy to disable non-portable int overflow tests
* dis.py: don't abuse range()
1993-11-08 15:05:21 +00:00
|
|
|
reduce
|
1992-11-27 22:54:49 +00:00
|
|
|
reload
|
|
|
|
repr
|
1993-03-29 11:30:50 +00:00
|
|
|
round
|
1992-11-27 22:54:49 +00:00
|
|
|
setattr
|
|
|
|
str
|
1994-11-10 22:25:26 +00:00
|
|
|
tuple
|
1992-11-27 22:54:49 +00:00
|
|
|
type
|
1994-11-10 22:25:26 +00:00
|
|
|
vars
|
|
|
|
xrange
|
1992-11-27 22:54:49 +00:00
|
|
|
test_exceptions
|
|
|
|
5. Built-in exceptions
|
|
|
|
AttributeError
|
|
|
|
EOFError
|
|
|
|
IOError
|
|
|
|
ImportError
|
|
|
|
IndexError
|
|
|
|
KeyError
|
|
|
|
KeyboardInterrupt
|
|
|
|
(not testable in a script)
|
|
|
|
MemoryError
|
|
|
|
(not safe to test)
|
|
|
|
NameError
|
|
|
|
OverflowError
|
|
|
|
RuntimeError
|
|
|
|
(not used any more?)
|
|
|
|
SyntaxError
|
|
|
|
SystemError
|
|
|
|
(hard to reproduce)
|
|
|
|
SystemExit
|
|
|
|
TypeError
|
|
|
|
ValueError
|
|
|
|
ZeroDivisionError
|
|
|
|
test_types
|
|
|
|
6. Built-in types
|
|
|
|
6.1 Truth value testing
|
|
|
|
6.2 Boolean operations
|
|
|
|
6.3 Comparisons
|
|
|
|
6.4 Numeric types (mostly conversions)
|
1993-01-21 15:36:40 +00:00
|
|
|
6.4.1 32-bit integers
|
|
|
|
6.4.2 Long integers
|
|
|
|
6.4.3 Floating point numbers
|
1992-11-27 22:54:49 +00:00
|
|
|
6.5 Sequence types
|
|
|
|
6.5.1 Strings
|
|
|
|
6.5.2 Tuples
|
|
|
|
6.5.3 Lists
|
|
|
|
6.5.3a Additional list operations
|
|
|
|
6.6 Mappings == Dictionaries
|
|
|
|
Passed all tests.
|