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"])
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"])
def test_lexer_errors(compiler_path, cool_file): compare_errors(compiler_path, tests_dir + cool_file, tests_dir + cool_file[:-3] + '_error.txt')
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')
def test_codegen(compiler_path, cool_file): compare_errors(compiler_path, tests_dir + cool_file, None)
def test_parser_errors(compiler_path, cool_file): compare_errors(compiler_path, tests_dir + cool_file, tests_dir + cool_file[:-3] + "_error.txt")