From 5c6a93ef2bd4863859744c20ac5729bea7f123d6 Mon Sep 17 00:00:00 2001 From: Mike Ash Date: Fri, 10 May 2019 12:07:24 -0400 Subject: [PATCH] [Test] Delete ErrorBridgedStatic test. This test checks that error bridging with ObjC bridging works when the stdlib is statically linked. We no longer support static linking of the stdlib on platforms with ObjC interop. rdar://problem/49699316 --- test/stdlib/ErrorBridgedStatic.swift | 42 ---------------------------- 1 file changed, 42 deletions(-) delete mode 100644 test/stdlib/ErrorBridgedStatic.swift diff --git a/test/stdlib/ErrorBridgedStatic.swift b/test/stdlib/ErrorBridgedStatic.swift deleted file mode 100644 index 726b9b73b6a7f..0000000000000 --- a/test/stdlib/ErrorBridgedStatic.swift +++ /dev/null @@ -1,42 +0,0 @@ -// RUN: %empty-directory(%t) -// RUN: %target-clang -fmodules -c -o %t/ErrorBridgedStaticImpl.o %S/Inputs/ErrorBridgedStaticImpl.m -// RUN: %target-build-swift -static-stdlib -o %t/ErrorBridgedStatic %t/ErrorBridgedStaticImpl.o %s -import-objc-header %S/Inputs/ErrorBridgedStaticImpl.h -// RUN: strip %t/ErrorBridgedStatic -// RUN: %target-run %t/ErrorBridgedStatic - -// REQUIRES: rdar50279940 -// REQUIRES: executable_test -// REQUIRES: objc_interop -// REQUIRES: static_stdlib - -import StdlibUnittest - -class Bar: Foo { - override func foo(_ x: Int32) throws { - try super.foo(5) - } - - override func foothrows(_ x: Int32) throws { - try super.foothrows(5) - } -} - -var ErrorBridgingStaticTests = TestSuite("ErrorBridging with static libs") - -ErrorBridgingStaticTests.test("round-trip Swift override of ObjC method") { - do { - try (Bar() as Foo).foo(5) - } catch { } -} - -ErrorBridgingStaticTests.test("round-trip Swift override of throwing ObjC method") { - do { - try (Bar() as Foo).foothrows(5) - } catch { - print(error) - expectEqual(error._domain, "abcd") - expectEqual(error._code, 1234) - } -} - -runAllTests()