@@ -118,7 +118,6 @@ test "empty limbs when uninitialized (https://github.com/def-/nim-bigints/issues
118
118
# logic around sign might also play a role
119
119
var
120
120
zeroEmpty: BigInt # should be treated as zero, same with -zeroEmpty
121
- result : BigInt
122
121
let
123
122
zeroInt32: int32 = 0
124
123
oneInt32: int32 = 1
@@ -156,10 +155,10 @@ test "empty limbs when uninitialized (https://github.com/def-/nim-bigints/issues
156
155
check - zeroEmpty == zero # error: fixed
157
156
158
157
# proc unsignedAdditionInt(a: var BigInt, b: BigInt, c: int32)
159
- check zeroEmpty + 1 .int32 == one # fatal[IndexError] in bigints.nim(181) unsignedAdditionInt
160
- check - zeroEmpty + 1 .int32 == one # fatal[IndexError] in bigints.nim(245) unsignedSubtractionInt
161
- check zeroEmpty + (- 1 ).int32 == - one # fatal[IndexError] in bigints.nim(245) unsignedSubtractionInt
162
- check - zeroEmpty + (- 1 ).int32 == - one # fatal[IndexError] in bigints.nim(181) unsignedAdditionInt
158
+ check zeroEmpty + 1 .int32 == one # fixed: fatal[IndexError] in bigints.nim(181) unsignedAdditionInt
159
+ check - zeroEmpty + 1 .int32 == one # fixed: fatal[IndexError] in bigints.nim(245) unsignedSubtractionInt
160
+ check zeroEmpty + (- 1 ).int32 == - one # fixed: fatal[IndexError] in bigints.nim(245) unsignedSubtractionInt
161
+ check - zeroEmpty + (- 1 ).int32 == - one # fixed: fatal[IndexError] in bigints.nim(181) unsignedAdditionInt
163
162
164
163
# proc unsignedAddition(a: var BigInt, b, c: BigInt)
165
164
check zeroEmpty + one == one # ok
@@ -180,10 +179,10 @@ test "empty limbs when uninitialized (https://github.com/def-/nim-bigints/issues
180
179
check - zeroEmpty + - bigOne == - bigOne # ok
181
180
182
181
# proc unsignedSubtractionInt(a: var BigInt, b: BigInt, c: int32)
183
- check zeroEmpty - 1 .int32 == - one # fatal[IndexError] in bigints.nim(245) unsignedSubtractionInt
184
- check - zeroEmpty - 1 .int32 == - one # fatal[IndexError] in bigints.nim(181) unsignedAdditionInt
185
- check zeroEmpty - (- 1 ).int32 == one # fatal[IndexError] in bigints.nim(181) unsignedAdditionInt
186
- check - zeroEmpty - (- 1 ).int32 == one # fatal[IndexError] in bigints.nim(245) unsignedSubtractionInt
182
+ check zeroEmpty - 1 .int32 == - one # fixed: fatal[IndexError] in bigints.nim(245) unsignedSubtractionInt
183
+ check - zeroEmpty - 1 .int32 == - one # fixed: fatal[IndexError] in bigints.nim(181) unsignedAdditionInt
184
+ check zeroEmpty - (- 1 ).int32 == one # fixed: fatal[IndexError] in bigints.nim(181) unsignedAdditionInt
185
+ check - zeroEmpty - (- 1 ).int32 == one # fixed: fatal[IndexError] in bigints.nim(245) unsignedSubtractionInt
187
186
188
187
# proc unsignedSubtraction(a: var BigInt, b, c: BigInt)
189
188
check zeroEmpty - one == - one # ok
0 commit comments