@@ -316,12 +316,18 @@ end
316
316
@test convert (FixedDecimal{BigInt,2 }, UInt128 (1 )). i == BigInt (100 )
317
317
@test convert (FixedDecimal{BigInt,2 }, Int128 (- 1 )). i == BigInt (- 100 )
318
318
@test convert (FixedDecimal{BigInt,2 }, typemax (UInt128)). i == BigInt (typemax (UInt128))* 100
319
+
320
+ @test convert (FixedDecimal{BigInt, 1 }, Int128 (1 )). i == BigInt (10 )
321
+ @test convert (FixedDecimal{BigInt, 0 }, Int128 (1 )). i == BigInt (1 )
319
322
end
320
323
321
324
@testset " Convert from Big* to BigInt" begin
322
325
@test convert (FixedDecimal{BigInt,2 }, BigInt (1 )). i == BigInt (100 )
323
326
@test convert (FixedDecimal{BigInt,2 }, BigFloat (1 )). i == BigInt (100 )
324
327
@test convert (FixedDecimal{BigInt,2 }, BigFloat (1.5 )). i == BigInt (150 )
328
+
329
+ @test convert (FixedDecimal{BigInt, 1 }, BigInt (1 )). i == BigInt (10 )
330
+ @test convert (FixedDecimal{BigInt, 0 }, BigInt (1 )). i == BigInt (1 )
325
331
end
326
332
end
327
333
@@ -388,7 +394,7 @@ end # if @static Int === Int64
388
394
@testset " BigInt conversion performance" begin
389
395
b = BigInt (2 )
390
396
# Special-cased f=1 to not allocate for BigInt => FD conversion
391
- @test @allocated (convert (FixedDecimal{BigInt, 1 }, b)) == 0
397
+ @test @allocated (convert (FixedDecimal{BigInt, 0 }, b)) == 0
392
398
end
393
399
394
400
end # module PerfTests
0 commit comments