mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
19 lines
446 B
Swift
19 lines
446 B
Swift
// RUN: %target-run-simple-swift(-I %S/Inputs/ -Xfrontend -enable-experimental-cxx-interop)
|
|
// REQUIRES: executable_test
|
|
|
|
import StdlibUnittest
|
|
import Extensions
|
|
|
|
var CxxClassExtensionsTestSuite = TestSuite("CxxClassExtensions")
|
|
|
|
extension Outer.Space.Foo {
|
|
func bar() -> Int32 { return a + 1 }
|
|
}
|
|
|
|
CxxClassExtensionsTestSuite.test("calling extension method") {
|
|
var foo = Outer.Space.Foo(a: 123)
|
|
expectEqual(124, foo.bar())
|
|
}
|
|
|
|
runAllTests()
|