Skip to content

Commit 63a374e

Browse files
committed
Reorder code
1 parent b1c8105 commit 63a374e

1 file changed

Lines changed: 16 additions & 15 deletions

File tree

Tests/SortedArrayTests/PerformanceTests.swift

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -62,21 +62,6 @@ class PerformanceTests: XCTestCase {
6262
}
6363
}
6464

65-
class Box<T: Comparable>: Comparable {
66-
static func <(lhs: Box<T>, rhs: Box<T>) -> Bool {
67-
return lhs.value < rhs.value
68-
}
69-
70-
static func ==(lhs: Box<T>, rhs: Box<T>) -> Bool {
71-
return lhs.value == rhs.value
72-
}
73-
74-
let value: T
75-
init(_ value: T) {
76-
self.value = value
77-
}
78-
}
79-
8065
extension PerformanceTests {
8166
static var allTests : [(String, (PerformanceTests) -> () throws -> Void)] {
8267
return [
@@ -90,3 +75,19 @@ extension PerformanceTests {
9075
]
9176
}
9277
}
78+
79+
/// Helper class
80+
class Box<T: Comparable>: Comparable {
81+
static func ==(lhs: Box<T>, rhs: Box<T>) -> Bool {
82+
return lhs.value == rhs.value
83+
}
84+
85+
static func <(lhs: Box<T>, rhs: Box<T>) -> Bool {
86+
return lhs.value < rhs.value
87+
}
88+
89+
let value: T
90+
init(_ value: T) {
91+
self.value = value
92+
}
93+
}

0 commit comments

Comments
 (0)