Pārlūkot izejas kodu

Add 10.12 check for tests results, as macOS results are now correct.

Jon Shier 9 gadi atpakaļ
vecāks
revīzija
1f45297b3b
1 mainītis faili ar 5 papildinājumiem un 1 dzēšanām
  1. 5 1
      Tests/ServerTrustPolicyTests.swift

+ 5 - 1
Tests/ServerTrustPolicyTests.swift

@@ -1412,7 +1412,11 @@ class ServerTrustPolicyCertificatesInBundleTestCase: ServerTrustPolicyTestCase {
         #if os(macOS)
             // For some reason, macOS is allowing all certificates to be considered valid. Need to file a
             // rdar demonstrating this behavior.
-            XCTAssertEqual(certificates.count, 23, "Expected 23 well-formed certificates")
+            if #available(OSX 10.12, *) {
+                XCTAssertEqual(certificates.count, 19, "Expected 19 well-formed certificates")
+            } else {
+                XCTAssertEqual(certificates.count, 23, "Expected 23 well-formed certificates")
+            }
         #else
             XCTAssertEqual(certificates.count, 19, "Expected 19 well-formed certificates")
         #endif