MCPcopy Create free account
hub / github.com/hashintel/hash / integer_conversion_limits

Function integer_conversion_limits

libs/@local/codec/src/numeric/real.rs:608–615  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

606
607 #[test]
608 fn integer_conversion_limits() {
609 // Test values that are beyond i32 range
610 let large_value = Real::from(i64::MAX);
611 assert_eq!(large_value.to_i32(), None); // Should be None as it's too large for i32
612
613 let neg_large_value = Real::from(i64::MIN);
614 assert_eq!(neg_large_value.to_i32(), None); // Should be None as it's too small for i32
615 }
616
617 #[test]
618 fn conversion_errors() {

Callers

nothing calls this directly

Calls 1

fromFunction · 0.50

Tested by

no test coverage detected