-
Notifications
You must be signed in to change notification settings - Fork 2
/
run-tests.py
executable file
·36 lines (33 loc) · 2.28 KB
/
run-tests.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
import os
import sys
import compiler
import interp_Pvar
import type_check_Pvar
import interp_Llambda
import type_check_Llambda
import interp_Clambda
import type_check_Clambda
from utils import run_tests, run_one_test, enable_tracing
compiler = compiler.Compiler()
#enable_tracing() #comment this to see less information in the output
arg = sys.argv[1]
if arg == 'all':
run_tests('var', compiler, 'var', type_check_Llambda.TypeCheckLlambda().type_check, interp_Llambda.InterpLlambda().interp,type_check_Clambda.TypeCheckClambda().type_check, interp_Clambda.InterpClambda().interp)
run_tests('conditional', compiler, 'conditional', type_check_Llambda.TypeCheckLlambda().type_check, interp_Llambda.InterpLlambda().interp,type_check_Clambda.TypeCheckClambda().type_check, interp_Clambda.InterpClambda().interp)
run_tests('loop', compiler, 'loop', type_check_Llambda.TypeCheckLlambda().type_check, interp_Llambda.InterpLlambda().interp,type_check_Clambda.TypeCheckClambda().type_check, interp_Clambda.InterpClambda().interp)
run_tests('tuple', compiler, 'tuple', type_check_Llambda.TypeCheckLlambda().type_check, interp_Llambda.InterpLlambda().interp,type_check_Clambda.TypeCheckClambda().type_check, interp_Clambda.InterpClambda().interp)
run_tests('function', compiler, 'function', type_check_Llambda.TypeCheckLlambda().type_check, interp_Llambda.InterpLlambda().interp,type_check_Clambda.TypeCheckClambda().type_check, interp_Clambda.InterpClambda().interp)
run_tests('lambda', compiler, 'lambda', type_check_Llambda.TypeCheckLlambda().type_check, interp_Llambda.InterpLlambda().interp,type_check_Clambda.TypeCheckClambda().type_check, interp_Clambda.InterpClambda().interp)
else:
run_tests(arg, compiler, arg, type_check_Llambda.TypeCheckLlambda().type_check, interp_Llambda.InterpLlambda().interp,type_check_Clambda.TypeCheckClambda().type_check, interp_Clambda.InterpClambda().interp)
""" if False:
run_one_test(os.getcwd() + '/tests/var/zero.py', 'var',
compiler, 'var',
type_check_Pvar.TypeCheckPvar().type_check_P,
interp_Pvar.InterpPvar().interp_P,
None)
else:
run_tests('var', compiler, 'var',
type_check_Pvar.TypeCheckPvar().type_check_P,
interp_Pvar.InterpPvar().interp_P,
None) """