Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit42802a3

Browse files
committed
Print the tested value in int_log tests
1 parent2238945 commit42802a3

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

‎core/tests/num/int_log.rs‎

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ fn checked_ilog() {
2424

2525
#[cfg(not(miri))]// Miri is too slow
2626
for iin i16::MIN..=0{
27-
assert_eq!(i.checked_ilog(4),None);
27+
assert_eq!(i.checked_ilog(4),None,"checking {i}");
2828
}
2929
#[cfg(not(miri))]// Miri is too slow
3030
for iin1..=i16::MAX{
31-
assert_eq!(i.checked_ilog(13),Some((iasf32).log(13.0)asu32));
31+
assert_eq!(i.checked_ilog(13),Some((iasf32).log(13.0)asu32),"checking {i}");
3232
}
3333
#[cfg(not(miri))]// Miri is too slow
3434
for iin1..=u16::MAX{
35-
assert_eq!(i.checked_ilog(13),Some((iasf32).log(13.0)asu32));
35+
assert_eq!(i.checked_ilog(13),Some((iasf32).log(13.0)asu32),"checking {i}");
3636
}
3737
}
3838

@@ -49,30 +49,30 @@ fn checked_ilog2() {
4949
assert_eq!(0i16.checked_ilog2(),None);
5050

5151
for iin1..=u8::MAX{
52-
assert_eq!(i.checked_ilog2(),Some((iasf32).log2()asu32));
52+
assert_eq!(i.checked_ilog2(),Some((iasf32).log2()asu32),"checking {i}");
5353
}
5454
#[cfg(not(miri))]// Miri is too slow
5555
for iin1..=u16::MAX{
5656
// Guard against Android's imprecise f32::ilog2 implementation.
5757
if i !=8192 && i !=32768{
58-
assert_eq!(i.checked_ilog2(),Some((iasf32).log2()asu32));
58+
assert_eq!(i.checked_ilog2(),Some((iasf32).log2()asu32),"checking {i}");
5959
}
6060
}
6161
for iin i8::MIN..=0{
62-
assert_eq!(i.checked_ilog2(),None);
62+
assert_eq!(i.checked_ilog2(),None,"checking {i}");
6363
}
6464
for iin1..=i8::MAX{
65-
assert_eq!(i.checked_ilog2(),Some((iasf32).log2()asu32));
65+
assert_eq!(i.checked_ilog2(),Some((iasf32).log2()asu32),"checking {i}");
6666
}
6767
#[cfg(not(miri))]// Miri is too slow
6868
for iin i16::MIN..=0{
69-
assert_eq!(i.checked_ilog2(),None);
69+
assert_eq!(i.checked_ilog2(),None,"checking {i}");
7070
}
7171
#[cfg(not(miri))]// Miri is too slow
7272
for iin1..=i16::MAX{
7373
// Guard against Android's imprecise f32::ilog2 implementation.
7474
if i !=8192{
75-
assert_eq!(i.checked_ilog2(),Some((iasf32).log2()asu32));
75+
assert_eq!(i.checked_ilog2(),Some((iasf32).log2()asu32),"checking {i}");
7676
}
7777
}
7878
}
@@ -95,19 +95,19 @@ fn checked_ilog10() {
9595

9696
#[cfg(not(miri))]// Miri is too slow
9797
for iin i16::MIN..=0{
98-
assert_eq!(i.checked_ilog10(),None);
98+
assert_eq!(i.checked_ilog10(),None,"checking {i}");
9999
}
100100
#[cfg(not(miri))]// Miri is too slow
101101
for iin1..=i16::MAX{
102-
assert_eq!(i.checked_ilog10(),Some((iasf32).log10()asu32));
102+
assert_eq!(i.checked_ilog10(),Some((iasf32).log10()asu32),"checking {i}");
103103
}
104104
#[cfg(not(miri))]// Miri is too slow
105105
for iin1..=u16::MAX{
106-
assert_eq!(i.checked_ilog10(),Some((iasf32).log10()asu32));
106+
assert_eq!(i.checked_ilog10(),Some((iasf32).log10()asu32),"checking {i}");
107107
}
108108
#[cfg(not(miri))]// Miri is too slow
109109
for iin1..=100_000u32{
110-
assert_eq!(i.checked_ilog10(),Some((iasf32).log10()asu32));
110+
assert_eq!(i.checked_ilog10(),Some((iasf32).log10()asu32),"checking {i}");
111111
}
112112
}
113113

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp