Skip to content

Commit 9dc7dd8

Browse files
committed
[Test] Add runtime 9999-availability check for a new test in Swift 5.1
The testEncodingMultipleNestedContainersWithTheSameTopLevelKey check is new in Swift 5.1 and will not pass when running with a 5.0 stdlib. rdar://problem/50151131
1 parent 6e7d83c commit 9dc7dd8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/stdlib/TestPlistEncoder.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -873,7 +873,11 @@ PropertyListEncoderTests.test("testEncodingTopLevelStructuredSingleClass") { Tes
873873
PropertyListEncoderTests.test("testEncodingTopLevelDeepStructuredType") { TestPropertyListEncoder().testEncodingTopLevelDeepStructuredType() }
874874
PropertyListEncoderTests.test("testEncodingClassWhichSharesEncoderWithSuper") { TestPropertyListEncoder().testEncodingClassWhichSharesEncoderWithSuper() }
875875
PropertyListEncoderTests.test("testEncodingTopLevelNullableType") { TestPropertyListEncoder().testEncodingTopLevelNullableType() }
876-
PropertyListEncoderTests.test("testEncodingMultipleNestedContainersWithTheSameTopLevelKey") { TestPropertyListEncoder().testEncodingMultipleNestedContainersWithTheSameTopLevelKey() }
876+
PropertyListEncoderTests.test("testEncodingMultipleNestedContainersWithTheSameTopLevelKey") {
877+
if #available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *) {
878+
TestPropertyListEncoder().testEncodingMultipleNestedContainersWithTheSameTopLevelKey()
879+
}
880+
}
877881
PropertyListEncoderTests.test("testEncodingConflictedTypeNestedContainersWithTheSameTopLevelKey") {
878882
expectCrash() {
879883
TestPropertyListEncoder().testEncodingConflictedTypeNestedContainersWithTheSameTopLevelKey()

0 commit comments

Comments
 (0)