Skip to content
This repository has been archived by the owner on Feb 14, 2021. It is now read-only.

Commit

Permalink
Change Report Formmat
Browse files Browse the repository at this point in the history
  • Loading branch information
danielgpz committed Jan 20, 2020
1 parent 050180e commit b89571e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions tests/codegen_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from utils import compare_errors

tests_dir = __file__.rpartition('/')[0] + '/codegen/'
tests = [(tests_dir + file) for file in os.listdir(tests_dir) if file.endswith('.cl')]
tests = [(file) for file in os.listdir(tests_dir) if file.endswith('.cl')]

@pytest.mark.run(order=4)
@pytest.mark.lexer
Expand All @@ -12,4 +12,4 @@
@pytest.mark.ok
@pytest.mark.parametrize("cool_file", tests)
def test_codegen(compiler_path, cool_file):
compare_errors(compiler_path, cool_file, None)
compare_errors(compiler_path, tests_dir + cool_file, None)
4 changes: 2 additions & 2 deletions tests/lexer_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
from utils import compare_errors

tests_dir = __file__.rpartition('/')[0] + '/lexer/'
tests = [(tests_dir + file) for file in os.listdir(tests_dir) if file.endswith('.cl')]
tests = [(file) for file in os.listdir(tests_dir) if file.endswith('.cl')]

@pytest.mark.run(order=1)
@pytest.mark.lexer
@pytest.mark.error
@pytest.mark.parametrize("cool_file", tests)
def test_lexer_errors(compiler_path, cool_file):
compare_errors(compiler_path, cool_file, cool_file[:-3] + '_error.txt')
compare_errors(compiler_path, tests_dir + cool_file, cool_file[:-3] + '_error.txt')
4 changes: 2 additions & 2 deletions tests/parser_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
from utils import compare_errors

tests_dir = __file__.rpartition('/')[0] + '/parser/'
tests = [(tests_dir + file) for file in os.listdir(tests_dir) if file.endswith('.cl')]
tests = [(file) for file in os.listdir(tests_dir) if file.endswith('.cl')]

@pytest.mark.run(order=2)
@pytest.mark.parser
@pytest.mark.error
@pytest.mark.parametrize("cool_file", tests)
def test_parser_errors(compiler_path, cool_file):
compare_errors(compiler_path, cool_file, cool_file[:-3] + '_error.txt')
compare_errors(compiler_path, tests_dir + cool_file, cool_file[:-3] + '_error.txt')
4 changes: 2 additions & 2 deletions tests/semantic_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
from utils import compare_errors

tests_dir = __file__.rpartition('/')[0] + '/semantic/'
tests = [(tests_dir + file) for file in os.listdir(tests_dir) if file.endswith('.cl')]
tests = [(file) for file in os.listdir(tests_dir) if file.endswith('.cl')]

@pytest.mark.run(order=3)
@pytest.mark.semantic
@pytest.mark.error
@pytest.mark.parametrize("cool_file", [])
def test_semantic_errors(compiler_path, cool_file):
compare_errors(compiler_path, cool_file, cool_file[:-3] + '_error.txt')
compare_errors(compiler_path, tests_dir + cool_file, cool_file[:-3] + '_error.txt')

0 comments on commit b89571e

Please sign in to comment.