MCPcopy Create free account
hub / github.com/TankHQ/tank / integer_from_float64

Function integer_from_float64

tests/value.rs:2017–2020  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2015
2016 #[test]
2017 fn integer_from_float64() {
2018 assert_eq!(i32::try_from_value(Value::Float64(Some(10.0))).unwrap(), 10);
2019 assert!(i32::try_from_value(Value::Float64(Some(10.5))).is_err());
2020 }
2021
2022 #[test]
2023 fn integer_cross_type_conversions() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected