Skip to content

Commit

Permalink
Disable all but one test on the very slow vector simulator
Browse files Browse the repository at this point in the history
  • Loading branch information
mossprescott committed Apr 25, 2024
1 parent 955e170 commit 7d392f8
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions alt/scheme/test_rvm.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,20 @@

SHOW_ALL_LABELS = False

def run_vector(program, **args):
return run_to_halt(program, simulator="vector", interpreter="jack", **args)
def run_codegen(program, **args):
return run_to_halt(program, simulator="codegen", interpreter="jack", **args)
# Assembly is completely broken now (doesn't handle tagged objects)
# def assembly(program, **args):
# return run_to_halt(program, simulator="codegen", interpreter="assembly", **args)

def parameterize_both(f):
return pytest.mark.parametrize("run", [run_vector, run_codegen])(f)

def parameterize(f):
def vector(program, **args):
return run_to_halt(program, simulator="vector", interpreter="jack", **args)
def codegen(program, **args):
return run_to_halt(program, simulator="codegen", interpreter="jack", **args)
# Assembly is completely broken now (doesn't handle tagged objects)
# def assembly(program, **args):
# return run_to_halt(program, simulator="codegen", interpreter="assembly", **args)
return pytest.mark.parametrize("run", [vector, codegen])(f)
# vector is just too darn slow
return pytest.mark.parametrize("run", [run_codegen])(f)


def run_jack(program):
Expand Down Expand Up @@ -206,7 +210,8 @@ def test_define(run):
assert output == []


@parameterize
# Just run this one on the slow simulator as a sanity check:
@parameterize_both
def test_fact(run):
program = """
(define (fact n)
Expand Down

0 comments on commit 7d392f8

Please sign in to comment.