Files
swift-mirror/test/stdlib/ErrorBridgedStatic.swift
Arnold Schwaighofer e75f69ba46 Disable test/stdlib/ErrorBridgedStatic.swift on no_asserts builds
For some reason this test fails on the bots.
I could not reproduce the failure locally.
rdar://39473208
2018-04-20 13:04:26 -07:00

31 lines
817 B
Swift

// 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: executable_test
// REQUIRES: objc_interop
// REQUIRES: static_stdlib
// rdar://39473208
// REQUIRES: asserts
import StdlibUnittest
class Bar: Foo {
override func foo(_ x: Int32) throws {
try super.foo(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 { }
}
runAllTests()