Skip to content

Commit 258fead

Browse files
committed
Build.rs: better debug output
1 parent 673a6f9 commit 258fead

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

build.rs

+6-4
Original file line numberDiff line numberDiff line change
@@ -1913,8 +1913,9 @@ static TEST_CASES: &[((i128,), u64)] = &[
19131913
fn floattidf() {
19141914
for &((a,), b) in TEST_CASES {
19151915
let b_ = __floattidf(a);
1916-
let diff = if to_u64(b_) > b { to_u64(b_) - b } else { b - to_u64(b_) };
1917-
assert_eq!(((a,), b, true), ((a,), b, diff <= 1));
1916+
let g_b = to_u64(b_);
1917+
let diff = if g_b > b { g_b - b } else { b - g_b };
1918+
assert_eq!(((a,), b, g_b, true), ((a,), b, g_b, diff <= 1));
19181919
}
19191920
}
19201921
"
@@ -2245,8 +2246,9 @@ static TEST_CASES: &[((u128,), u64)] = &[
22452246
fn floatuntidf() {
22462247
for &((a,), b) in TEST_CASES {
22472248
let b_ = __floatuntidf(a);
2248-
let diff = if to_u64(b_) > b { to_u64(b_) - b } else { b - to_u64(b_) };
2249-
assert_eq!(((a,), b, true), ((a,), b, diff <= 1));
2249+
let g_b = to_u64(b_);
2250+
let diff = if g_b > b { g_b - b } else { b - g_b };
2251+
assert_eq!(((a,), b, g_b, true), ((a,), b, g_b, diff <= 1));
22502252
}
22512253
}
22522254
"

0 commit comments

Comments
 (0)