Skip to content

Commit af549fe

Browse files
committed
Fail if translation-fail test successfully compiles
1 parent 7bc6f88 commit af549fe

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

tests/lit/lit/formats/Cpp2RustTest.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,9 @@ def fail(str, code = fail_code):
115115
return lit.Test.XFAIL, ''
116116
return fail('cpp2rust failed\n' + err)
117117

118+
if should_not_translate:
119+
return fail('expected translation-fail but cpp2rust succeeded')
120+
118121
expected_file = self.getExpectedFile(filepath, model, fname)
119122
if not os.path.exists(expected_file) and not replace_expected:
120123
return fail('no expected file')

0 commit comments

Comments
 (0)