Files
swift-mirror/test/Interop/Cxx/class/inline-function-codegen/constructor-calls-function-from-nested-struct-execution.swift
zoecarver 839839f924 [cxx-interop] Rename enable-cxx-interop -> enable-experimental-cxx-interop.
Also removes the driver flag, this will now also always be guarded on `-Xfrontend`.
2022-04-07 19:15:25 -07:00

20 lines
550 B
Swift

// RUN: %target-run-simple-swift(-I %S/Inputs -Xfrontend -enable-experimental-cxx-interop)
//
// REQUIRES: executable_test
import ConstructorCallsFunctionFromNestedStruct
import StdlibUnittest
var MembersTestSuite = TestSuite("MembersTestSuite")
MembersTestSuite.test("constructor calls function from nested struct (explicit)") {
expectEqual(42, callConstructor(41))
}
MembersTestSuite.test("constructor calls function from nested struct (implicit)") {
let holder = HoldMemberThatHolds42()
expectEqual(42, holder.holder.m)
}
runAllTests()