Exemple #1
0
def test_parser_errors(compiler_path, cool_file):
    compare_errors(compiler_path, tests_dir + cool_file,
                   tests_dir + cool_file[:-3] + '_error.txt')


# if __name__ == "__main__":
#     pytest.main(["-m", "parser"])
Exemple #2
0
def test_semantic_errors(compiler_path, cool_file):
    compare_errors(compiler_path, tests_dir + cool_file, tests_dir + cool_file[:-3] + '_error.txt', \
        cmp=first_error_only_line)


# if __name__ == "__main__":
#     pytest.main(["-m", "semantic"])
Exemple #3
0
def test_lexer_errors(compiler_path, cool_file):
    compare_errors(compiler_path, tests_dir + cool_file,
                   tests_dir + cool_file[:-3] + '_error.txt')
Exemple #4
0
def test_semantic_errors(compiler_path, cool_file):
    compare_errors(compiler_path, tests_dir + cool_file, tests_dir + cool_file[:-3] + '_error.txt', \
        cmp=first_error_only_line)
def test_lexer_errors(compiler_path, cool_file):
    print(compiler_path)
    print(cool_file)
    compare_errors(compiler_path, tests_dir + cool_file,
                   tests_dir + cool_file[:-3] + "_error.txt")
def test_parser_errors(compiler_path, cool_file):
    compare_errors(compiler_path, cool_file, cool_file[:-3] + '_error.txt')
Exemple #7
0
def test_codegen(compiler_path, cool_file):
    compare_errors(compiler_path, tests_dir + cool_file, None)
Exemple #8
0
def test_parser_errors(compiler_path, cool_file):
    compare_errors(compiler_path, tests_dir + cool_file,
                   tests_dir + cool_file[:-3] + "_error.txt")