We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2933ff5 commit 9483bf6Copy full SHA for 9483bf6
src/test.rs
@@ -713,4 +713,16 @@ mod mpf {
713
assert_eq!(five.sign(), Sign::Positive);
714
assert_eq!(minus_five.sign(), Sign::Negative);
715
}
716
+
717
+ #[test]
718
+ fn test_get_str() {
719
+ use libc::c_long;
720
+ let mut tmp = 0 as c_long;
721
+ let mut pi: Mpf = Mpf::zero();
722
+ assert_eq!(pi.get_str(4, 10, &mut tmp), "");
723
+ pi.set_from_str("3.141592653589", 10);
724
725
+ assert_eq!(&pi.get_str(4, 10, &mut tmp), "3142");
726
+ assert_eq!((-&pi).get_str(4, 10, &mut tmp), "-3142");
727
+ }
728
0 commit comments