Skip to content

Commit 181772d

Browse files
hackwalypeter-jerry-ye
authored andcommitted
workaround for msvc
1 parent 5eeed4c commit 181772d

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

builtin/int64_test.mbt

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7473,26 +7473,38 @@ test "grouped test for specific patterns" {
74737473
inspect(UInt64::reinterpret_as_double(0x7FFFFFFFFFFFFFFFUL), content="NaN")
74747474
}
74757475

7476+
///|
7477+
#inline(never)
7478+
fn int64_zero() -> Int64 {
7479+
0L
7480+
}
7481+
7482+
///|
7483+
#inline(never)
7484+
fn uint64_zero() -> UInt64 {
7485+
0UL
7486+
}
7487+
74767488
///|
74777489
test "panic 1L / 0L" {
7478-
let _ = 1L / 0L
7490+
let _ = 1L / int64_zero()
74797491

74807492
}
74817493

74827494
///|
74837495
test "panic 1L % 0L" {
7484-
let _ = 1L % 0L
7496+
let _ = 1L % int64_zero()
74857497

74867498
}
74877499

74887500
///|
74897501
test "panic 1UL / 0UL" {
7490-
let _ = 1UL / 0UL
7502+
let _ = 1UL / uint64_zero()
74917503

74927504
}
74937505

74947506
///|
74957507
test "panic 1UL % 0UL" {
7496-
let _ = 1UL % 0UL
7508+
let _ = 1UL % uint64_zero()
74977509

74987510
}

0 commit comments

Comments
 (0)