Files
swift-mirror/test/Interop/Cxx/templates/explicit-class-specialization.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

21 lines
727 B
Swift

// RUN: %target-run-simple-swift(-I %S/Inputs -Xfrontend -enable-experimental-cxx-interop)
//
// REQUIRES: executable_test
import ExplicitClassSpecialization
import StdlibUnittest
var TemplatesTestSuite = TestSuite("TemplatesTestSuite")
TemplatesTestSuite.test("explicit-specialization") {
let specializedInt = SpecializedIntWrapper(value: 7)
var specializedMagicInt = WrapperWithSpecialization(t: specializedInt)
expectEqual(specializedMagicInt.doubleIfSpecializedElseTriple(), 14)
let nonSpecializedInt = NonSpecializedIntWrapper(value: 7)
var nonSpecializedMagicInt = WrapperWithoutSpecialization(t: nonSpecializedInt)
expectEqual(nonSpecializedMagicInt.doubleIfSpecializedElseTriple(), 21)
}
runAllTests()