Skip to content

Commit dbe326a

Browse files
committed
Fix crashes in benchmarks
1 parent 9ca97d3 commit dbe326a

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

Tests/BitByteDataBenchmarks/LsbBitWriterBenchmarks.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ class LsbBitWriterBenchmarks: XCTestCase {
134134
let writer = LsbBitWriter()
135135

136136
for _ in 0..<1_000_000 {
137-
writer.write(signedNumber: -3256, bitsCount: 13, representation: .radixNegativeTwo)
137+
writer.write(signedNumber: -2549, bitsCount: 13, representation: .radixNegativeTwo)
138138
}
139139
}
140140
}

Tests/BitByteDataBenchmarks/MsbBitWriterBenchmarks.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ class MsbBitWriterBenchmarks: XCTestCase {
104104
let writer = MsbBitWriter()
105105

106106
for _ in 0..<1_000_000 {
107-
writer.write(signedNumber: 3256, bitsCount: 13, representation: .biased(bias: 127))
107+
writer.write(signedNumber: 123, bitsCount: 13, representation: .biased(bias: 127))
108108
}
109109
}
110110
}
@@ -114,7 +114,7 @@ class MsbBitWriterBenchmarks: XCTestCase {
114114
let writer = MsbBitWriter()
115115

116116
for _ in 0..<1_000_000 {
117-
writer.write(signedNumber: -3256, bitsCount: 13, representation: .biased(bias: 127))
117+
writer.write(signedNumber: -123, bitsCount: 13, representation: .biased(bias: 127))
118118
}
119119
}
120120
}
@@ -134,7 +134,7 @@ class MsbBitWriterBenchmarks: XCTestCase {
134134
let writer = MsbBitWriter()
135135

136136
for _ in 0..<1_000_000 {
137-
writer.write(signedNumber: -3256, bitsCount: 13, representation: .radixNegativeTwo)
137+
writer.write(signedNumber: -2549, bitsCount: 13, representation: .radixNegativeTwo)
138138
}
139139
}
140140
}

0 commit comments

Comments
 (0)