Sha256: 90ceb65d6b0e058906d0888d0da99f5cb32f1059e0890c0b65ae86b3af105feb
Contents?: true
Size: 591 Bytes
Versions: 19
Compression:
Stored size: 591 Bytes
Contents
macro_rules! rb_assert { ($s:literal) => { assert!(magnus::eval::<bool>($s).unwrap()) }; ($s:literal, $($rest:tt)*) => { let result: bool = magnus::eval!($s, $($rest)*).unwrap(); assert!(result) }; } #[test] fn it_converts_floats_to_value() { let _cleanup = unsafe { magnus::embed::init() }; rb_assert!("val == 0.5", val = 0.5); rb_assert!( "val == 18446744073709552000.0", val = 18446744073709552000.0 ); rb_assert!("val == Float::INFINITY", val = f64::INFINITY); rb_assert!("val.nan?", val = f64::NAN); }
Version data entries
19 entries across 19 versions & 1 rubygems