Perform a test case.
(testcase: DataDrivenTestCase)
| 96 | |
| 97 | |
| 98 | def test_semanal_error(testcase: DataDrivenTestCase) -> None: |
| 99 | """Perform a test case.""" |
| 100 | |
| 101 | try: |
| 102 | src = "\n".join(testcase.input) |
| 103 | res = build.build( |
| 104 | sources=[BuildSource("main", None, src)], |
| 105 | options=get_semanal_options(src, testcase), |
| 106 | alt_lib_path=test_temp_dir, |
| 107 | ) |
| 108 | a = res.errors |
| 109 | except CompileError as e: |
| 110 | # Verify that there was a compile error and that the error messages |
| 111 | # are equivalent. |
| 112 | a = e.messages |
| 113 | if testcase.normalize_output: |
| 114 | a = normalize_error_messages(a) |
| 115 | assert_string_arrays_equal( |
| 116 | testcase.output, a, f"Invalid compiler output ({testcase.file}, line {testcase.line})" |
| 117 | ) |
| 118 | |
| 119 | |
| 120 | # SymbolNode table export test cases |
no test coverage detected
searching dependent graphs…