[SwiftToCxx] Creating new test case and fixing namespace

This commit is contained in:
Roberto Rosmaninho
2022-09-05 10:38:28 -03:00
parent 9ebc0bd26e
commit 68bfbddf14
4 changed files with 37 additions and 15 deletions

View File

@@ -21,19 +21,22 @@ int main() {
try {
Functions::emptyThrowFunction();
} catch (swift::_impl::swift::Error& e) {
} catch (swift::Error& e) {
printf("Exception\n");
}
try {
Functions::throwFunction();
} catch (swift::_impl::swift::Error& e) {
} catch (swift::Error& e) {
printf("Exception\n");
}
try {
Functions::throwFunctionWithReturn();
} catch (swift::_impl::swift::Error& e) {
} catch (swift::Error& e) {
printf("Exception\n");
}
try {
Functions::testDestroyedError();
} catch(const swift::Error &e) { }
return 0;
}
@@ -43,3 +46,4 @@ int main() {
// CHECK-NEXT: Exception
// CHECK-NEXT: passThrowFunctionWithReturn
// CHECK-NEXT: Exception
// CHECK-NEXT: Test destroyed