Files
swift-mirror/test/Runtime/conformance_uniquing.swift
2018-12-13 13:56:21 -08:00

21 lines
536 B
Swift

// RUN: %target-run-simple-swift
// REQUIRES: executable_test
// REQUIRES: objc_interop
import StdlibUnittest
import Foundation
let conformanceUniquingTests = TestSuite("ConformanceUniquing")
func isSimpleSetAlgebra<T: SetAlgebra>(_: T.Type) -> Bool {
return T.self == T.Element.self
}
// rdar://problem/46685973
conformanceUniquingTests.test("Nested types with the same name") {
expectTrue(isSimpleSetAlgebra(NSData.WritingOptions.self))
expectTrue(isSimpleSetAlgebra(JSONSerialization.WritingOptions.self))
}
runAllTests()