test for panic if float is too large for real8
This commit is contained in:
parent
a1e9a3f90c
commit
babd7f1402
10
src/basic.rs
10
src/basic.rs
@ -275,10 +275,16 @@ mod tests {
|
||||
|
||||
assert_eq!(decode_real8(0x4110 << 48), 1.0);
|
||||
assert_eq!(decode_real8(0xC120 << 48), -2.0);
|
||||
|
||||
//TODO panics on invalid?
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[should_panic]
|
||||
fn test_encode_real8_panic() {
|
||||
use crate::basic::encode_real8;
|
||||
encode_real8(1e80);
|
||||
}
|
||||
|
||||
|
||||
#[test]
|
||||
fn test_parse_real8() {
|
||||
use crate::basic:: parse_real8;
|
||||
|
Loading…
x
Reference in New Issue
Block a user