Skip to content

Commit 203dc55

Browse files
committed
[benchmark] CheckResults → check
Capitalizing function names is against Swift naming conventions.
1 parent a723e6d commit 203dc55

File tree

104 files changed

+386
-373
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+386
-373
lines changed

benchmark/multi-source/PrimsSplit/Prims_main.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,6 +556,6 @@ public func run_PrimsSplit(_ N: Int) {
556556
for i in 1..<treeEdges.count {
557557
if let n = treeEdges[i] { cost += map[Edge(start: n, end: i)]! }
558558
}
559-
CheckResults(Int(cost) == 49324)
559+
check(Int(cost) == 49324)
560560
}
561561
}

benchmark/single-source/Ackermann.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,5 @@ public func run_Ackermann(_ N: Int) {
4747
break
4848
}
4949
}
50-
CheckResults(result == ref_result[n])
50+
check(result == ref_result[n])
5151
}

benchmark/single-source/ArrayLiteral.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public func run_ArrayValueProp(_ N: Int) {
4848
res += addLiteralArray()
4949
res -= addLiteralArray()
5050
}
51-
CheckResults(res == 123)
51+
check(res == 123)
5252
}
5353

5454

@@ -89,7 +89,7 @@ public func run_ArrayValueProp2(_ N: Int) {
8989
res += addLiteralArray2()
9090
res -= addLiteralArray2()
9191
}
92-
CheckResults(res == 123)
92+
check(res == 123)
9393
}
9494

9595
@inline(never)
@@ -99,7 +99,7 @@ public func run_ArrayValueProp3(_ N: Int) {
9999
res += addLiteralArray3()
100100
res -= addLiteralArray3()
101101
}
102-
CheckResults(res == 123)
102+
check(res == 123)
103103
}
104104

105105
@inline(never)
@@ -109,5 +109,5 @@ public func run_ArrayValueProp4(_ N: Int) {
109109
res += addLiteralArray4()
110110
res -= addLiteralArray4()
111111
}
112-
CheckResults(res == 123)
112+
check(res == 123)
113113
}

benchmark/single-source/ArraySubscript.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,6 @@ public func run_ArraySubscript(_ N: Int) {
4141
arrays[i][bound(i)] =
4242
max(arrays[i-1][bound(i-1)], arrays[i][bound(i)])
4343
}
44-
CheckResults(arrays[0][0] <= arrays[numArrays-1][bound(numArrays-1)])
44+
check(arrays[0][0] <= arrays[numArrays-1][bound(numArrays-1)])
4545
}
4646
}

benchmark/single-source/BinaryFloatingPointConversionFromBinaryInteger.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ public func run_BinaryFloatingPointConversionFromBinaryInteger(_ N: Int) {
206206
}
207207
xs.append(x)
208208
}
209-
CheckResults(xs[getInt(0)] == 1999000)
209+
check(xs[getInt(0)] == 1999000)
210210
}
211211

212212
#endif

benchmark/single-source/BinaryFloatingPointProperties.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public func run_BinaryFloatingPointPropertiesBinade(_ N: Int) {
4141
}
4242
xs.append(x)
4343
}
44-
CheckResults(xs[getInt(0)] == 37180757)
44+
check(xs[getInt(0)] == 37180757)
4545
}
4646

4747
@inline(never)
@@ -55,7 +55,7 @@ public func run_BinaryFloatingPointPropertiesNextUp(_ N: Int) {
5555
}
5656
xs.append(x)
5757
}
58-
CheckResults(xs[getInt(0)] == 49995000)
58+
check(xs[getInt(0)] == 49995000)
5959
}
6060

6161
@inline(never)
@@ -69,5 +69,5 @@ public func run_BinaryFloatingPointPropertiesUlp(_ N: Int) {
6969
}
7070
xs.append(x)
7171
}
72-
CheckResults(xs[getInt(0)] == 0)
72+
check(xs[getInt(0)] == 0)
7373
}

benchmark/single-source/BitCount.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,5 @@ public func run_BitCount(_ N: Int) {
4242
&+ countBitSet(getInt(2))
4343
&+ countBitSet(getInt(2457))
4444
}
45-
CheckResults(sum == 8 * 1000 * N)
45+
check(sum == 8 * 1000 * N)
4646
}

benchmark/single-source/BucketSort.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,6 @@ func run_BucketSort(_ N : Int) {
126126
for _ in 0..<N {
127127
let sortedArray = bucketSort(
128128
items, sortingAlgorithm: InsertionSort(), bucketArray: buckets)
129-
CheckResults(isAscending(sortedArray))
129+
check(isAscending(sortedArray))
130130
}
131131
}

benchmark/single-source/BufferFill.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,10 @@ public func bufferFillFromSliceExecute(n: Int) {
6161
let slice = Slice(base: a, bounds: a.indices)
6262
var (iterator, copied) = b.initialize(from: slice)
6363
blackHole(b)
64-
CheckResults(copied == a.count && iterator.next() == nil)
64+
check(copied == a.count && iterator.next() == nil)
6565
}
6666

67-
CheckResults(a[r] == b[r])
67+
check(a[r] == b[r])
6868
}
6969

7070
var ra: [UInt8] = []
@@ -94,7 +94,7 @@ public func rawBufferCopyBytesExecute(n: Int) {
9494
blackHole(rb)
9595
}
9696

97-
CheckResults(ra[r] == rb[r])
97+
check(ra[r] == rb[r])
9898
}
9999

100100
public func rawBufferInitializeMemorySetup() {
@@ -117,12 +117,12 @@ public func rawBufferInitializeMemoryExecute(n: Int) {
117117
for _ in 0..<n {
118118
var (iterator, initialized) = rb.initializeMemory(as: Int.self, from: a)
119119
blackHole(rb)
120-
CheckResults(initialized.count == a.count && iterator.next() == nil)
120+
check(initialized.count == a.count && iterator.next() == nil)
121121
}
122122

123123
let offset = rb.baseAddress!.advanced(by: r*MemoryLayout<Int>.stride)
124124
let value = offset.load(as: Int.self)
125-
CheckResults(value == a[r])
125+
check(value == a[r])
126126
}
127127

128128
var r8: UnsafeRawBufferPointer = .init(start: nil, count: 0)
@@ -159,8 +159,8 @@ public func rawBufferCopyContentsExecute(n: Int) {
159159
for _ in 0..<n {
160160
var (iterator, initialized) = b8.initialize(from: r8)
161161
blackHole(b8)
162-
CheckResults(initialized == r8.count && iterator.next() == nil)
162+
check(initialized == r8.count && iterator.next() == nil)
163163
}
164164

165-
CheckResults(b8[r] == r8[r])
165+
check(b8[r] == r8[r])
166166
}

benchmark/single-source/ByteSwap.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,5 @@ public func run_ByteSwap(_ N: Int) {
5353
&+ byteswap_logn(byteswap_n(x &+ 9129))
5454
&+ byteswap_logn(byteswap_n(x &+ 3333))
5555
}
56-
CheckResults(s == (2457 &+ 9129 &+ 3333) &* 10000 &* N)
56+
check(s == (2457 &+ 9129 &+ 3333) &* 10000 &* N)
5757
}

0 commit comments

Comments
 (0)