We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2980878 commit 3d6070dCopy full SHA for 3d6070d
test/stdlib/Span/InlineSpanProperties.swift
@@ -86,3 +86,20 @@ suite.test("InlineArray.span property")
86
expectEqual(span[i], s[i])
87
}
88
89
+
90
+suite.test("InlineArray.span property (String)")
91
+.skip(.custom(
92
+ { if #available(SwiftStdlib 6.2, *) { false } else { true } },
93
+ reason: "Requires Swift 6.2's standard library"
94
+))
95
+.code {
96
+ guard #available(SwiftStdlib 6.2, *) else { return }
97
98
+ var s = InlineArray<5, String>(repeating: "0")
99
+ s[3] = String(Int.random(in: 0..<1000))
100
+ let span = s.span
101
+ expectEqual(span.count, s.count)
102
+ for i in s.indices {
103
+ expectEqual(span[i], s[i])
104
+ }
105
+}
0 commit comments