Skip to content

Commit

Permalink
StdlibUnittest: put complex generic constraints in the same order eve…
Browse files Browse the repository at this point in the history
…rywhere

Swift SVN r32294
  • Loading branch information
gribozavr committed Sep 29, 2015
1 parent 657c365 commit 7afb88f
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 21 deletions.
11 changes: 5 additions & 6 deletions stdlib/private/StdlibUnittest/CheckCollectionType.swift
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,7 @@ extension TestSuite {
where
Collection.SubSequence : CollectionType,
Collection.SubSequence.Generator.Element == Collection.Generator.Element,
Collection.SubSequence.SubSequence : CollectionType,
Collection.SubSequence == Collection.SubSequence.SubSequence,
Collection.SubSequence.SubSequence == Collection.SubSequence,
CollectionWithEquatableElement.Generator.Element : Equatable
>(
var testNamePrefix: String = "",
Expand Down Expand Up @@ -780,11 +779,11 @@ self.test("\(testNamePrefix).removeFirst(n: Int)/slice/removeTooMany/semantics")
CollectionWithEquatableElement : CollectionType
where
Collection.Index : BidirectionalIndexType,
CollectionWithEquatableElement.Index : BidirectionalIndexType,
Collection.SubSequence : CollectionType,
Collection.SubSequence.Generator.Element == Collection.Generator.Element,
Collection.SubSequence.Index : BidirectionalIndexType,
Collection.SubSequence == Collection.SubSequence.SubSequence,
Collection.SubSequence.SubSequence == Collection.SubSequence,
CollectionWithEquatableElement.Index : BidirectionalIndexType,
CollectionWithEquatableElement.Generator.Element : Equatable
>(
var testNamePrefix: String = "",
Expand Down Expand Up @@ -1082,11 +1081,11 @@ self.test("\(testNamePrefix).suffix/semantics") {
CollectionWithEquatableElement : CollectionType
where
Collection.Index : RandomAccessIndexType,
CollectionWithEquatableElement.Index : RandomAccessIndexType,
Collection.SubSequence : CollectionType,
Collection.SubSequence == Collection.SubSequence.SubSequence,
Collection.SubSequence.Generator.Element == Collection.Generator.Element,
Collection.SubSequence.Index : RandomAccessIndexType,
Collection.SubSequence.SubSequence == Collection.SubSequence,
CollectionWithEquatableElement.Index : RandomAccessIndexType,
CollectionWithEquatableElement.Generator.Element : Equatable
>(
var testNamePrefix: String = "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ extension TestSuite {
CollectionWithComparableElement : MutableCollectionType
where
Collection.SubSequence : MutableCollectionType,
Collection.SubSequence == Collection.SubSequence.SubSequence,
Collection.SubSequence.Generator.Element == Collection.Generator.Element,
Collection.SubSequence.SubSequence == Collection.SubSequence,
CollectionWithEquatableElement.Generator.Element : Equatable,
CollectionWithComparableElement.Generator.Element : Comparable
>(
Expand Down Expand Up @@ -374,13 +374,13 @@ self.test("\(testNamePrefix).sort/${'Predicate' if predicate else 'WhereElementI
CollectionWithComparableElement : MutableCollectionType
where
Collection.Index : BidirectionalIndexType,
CollectionWithEquatableElement.Index : BidirectionalIndexType,
CollectionWithComparableElement.Index : BidirectionalIndexType,
Collection.SubSequence : MutableCollectionType,
Collection.SubSequence == Collection.SubSequence.SubSequence,
Collection.SubSequence.Generator.Element == Collection.Generator.Element,
Collection.SubSequence.Index : BidirectionalIndexType,
Collection.SubSequence.SubSequence == Collection.SubSequence,
CollectionWithEquatableElement.Index : BidirectionalIndexType,
CollectionWithEquatableElement.Generator.Element : Equatable,
CollectionWithComparableElement.Index : BidirectionalIndexType,
CollectionWithComparableElement.Generator.Element : Comparable
>(
var testNamePrefix: String = "",
Expand Down Expand Up @@ -491,13 +491,13 @@ if resiliencyChecks.subscriptOnOutOfBoundsIndicesBehavior != .None {
CollectionWithComparableElement : MutableCollectionType
where
Collection.Index : RandomAccessIndexType,
CollectionWithEquatableElement.Index : RandomAccessIndexType,
CollectionWithComparableElement.Index : RandomAccessIndexType,
Collection.SubSequence : MutableCollectionType,
Collection.SubSequence == Collection.SubSequence.SubSequence,
Collection.SubSequence.Generator.Element == Collection.Generator.Element,
Collection.SubSequence.Index : RandomAccessIndexType,
Collection.SubSequence.SubSequence == Collection.SubSequence,
CollectionWithEquatableElement.Index : RandomAccessIndexType,
CollectionWithEquatableElement.Generator.Element : Equatable,
CollectionWithComparableElement.Index : RandomAccessIndexType,
CollectionWithComparableElement.Generator.Element : Comparable
>(
var testNamePrefix: String = "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -344,8 +344,8 @@ extension TestSuite {
CollectionWithEquatableElement : RangeReplaceableCollectionType
where
Collection.SubSequence : CollectionType,
Collection.SubSequence == Collection.SubSequence.SubSequence,
Collection.SubSequence.Generator.Element == Collection.Generator.Element,
Collection.SubSequence.SubSequence == Collection.SubSequence,
CollectionWithEquatableElement.Generator.Element : Equatable
>(
var testNamePrefix: String = "",
Expand Down Expand Up @@ -1101,11 +1101,11 @@ self.test("\(testNamePrefix).OperatorPlus") {
CollectionWithEquatableElement : RangeReplaceableCollectionType
where
Collection.Index : BidirectionalIndexType,
CollectionWithEquatableElement.Index : BidirectionalIndexType,
Collection.SubSequence : CollectionType,
Collection.SubSequence == Collection.SubSequence.SubSequence,
Collection.SubSequence.Generator.Element == Collection.Generator.Element,
Collection.SubSequence.Index : BidirectionalIndexType,
Collection.SubSequence.SubSequence == Collection.SubSequence,
CollectionWithEquatableElement.Index : BidirectionalIndexType,
CollectionWithEquatableElement.Generator.Element : Equatable
>(
var testNamePrefix: String = "",
Expand Down Expand Up @@ -1226,11 +1226,11 @@ self.test("\(testNamePrefix).removeLast(n: Int)/whereIndexIsBidirectional/remove
CollectionWithEquatableElement : RangeReplaceableCollectionType
where
Collection.Index : RandomAccessIndexType,
CollectionWithEquatableElement.Index : RandomAccessIndexType,
Collection.SubSequence : CollectionType,
Collection.SubSequence == Collection.SubSequence.SubSequence,
Collection.SubSequence.Generator.Element == Collection.Generator.Element,
Collection.SubSequence.Index : RandomAccessIndexType,
Collection.SubSequence.SubSequence == Collection.SubSequence,
CollectionWithEquatableElement.Index : RandomAccessIndexType,
CollectionWithEquatableElement.Generator.Element : Equatable
>(
var testNamePrefix: String = "",
Expand Down
5 changes: 2 additions & 3 deletions stdlib/private/StdlibUnittest/CheckSequenceType.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1436,9 +1436,8 @@ extension TestSuite {
where
SequenceWithEquatableElement.Generator.Element : Equatable,
Sequence.SubSequence : SequenceType,
Sequence.Generator.Element == Sequence.SubSequence.Generator.Element,
Sequence.SubSequence.SubSequence : SequenceType,
Sequence.SubSequence == Sequence.SubSequence.SubSequence
Sequence.SubSequence.Generator.Element == Sequence.Generator.Element,
Sequence.SubSequence.SubSequence == Sequence.SubSequence
>(
var testNamePrefix: String = "",
makeSequence: ([Sequence.Generator.Element]) -> Sequence,
Expand Down

0 comments on commit 7afb88f

Please sign in to comment.