Skip to content

Commit c93fcb9

Browse files
author
Max Moiseev
committed
[stdlib][swift-3-indexing-model] fixing Concatenate tests
The 'reversed' tests are marked as XFAILing, because required methods are not implemented on `ReversedCollection`.
1 parent b30a550 commit c93fcb9

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

stdlib/private/StdlibUnittest/StdlibUnittest.swift.gyb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1824,7 +1824,7 @@ public func checkStrideable<
18241824
Strides : Collection
18251825
where
18261826
Instances.Iterator.Element : Strideable,
1827-
Strides.Iterator.Element == Instances.Iterator.Element.Stride,
1827+
Instances.Iterator.Element.Stride == Strides.Iterator.Element,
18281828

18291829
// FIXME(compiler limitation): these constraints should be applied to
18301830
// associated types of Collection.

validation-test/stdlib/Concatenate.swift

+4-3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
// REQUIRES: executable_test
1414

1515
import StdlibUnittest
16+
import StdlibCollectionUnittest
1617

1718
// Also import modules which are used by StdlibUnittest internally. This
1819
// workaround is needed to link all required libraries in case we compile
@@ -37,14 +38,14 @@ let samples: ContiguousArray<(CountableRange<Int>, X)> = [
3738
(0..<0, [] as X),
3839
]
3940

40-
let expected = ContiguousArray(0..<8)
41-
4241
for (expected, source) in samples {
4342
ConcatenateTests.test("forward-\(source)") {
4443
checkBidirectionalCollection(expected, source.flatten())
4544
}
4645

47-
ConcatenateTests.test("reverse-\(source)") {
46+
ConcatenateTests.test("reverse-\(source)")
47+
.xfail(.custom( { true }, reason: "[swift-3-indexing-model] ReversedCollection.advance is not implemented"))
48+
.code {
4849
// FIXME: separate 'expected' and 'reversed' variables are a workaround
4950
// for: <rdar://problem/20789500>
5051
let expected = ContiguousArray(expected.lazy.reversed())

0 commit comments

Comments
 (0)