mirror of
https://github.com/tiffany352/rink-rs
synced 2024-11-10 13:44:15 +00:00
Test floats with leading dots in gnu_units
This commit is contained in:
parent
30fcab3528
commit
a5ccdaf1b9
1 changed files with 9 additions and 0 deletions
|
@ -610,4 +610,13 @@ mod tests {
|
|||
"Expected term, got Error(\"Unexpected EOF\")"
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_float_leading_dot() {
|
||||
use gmp::mpq::Mpq;
|
||||
use gmp::mpz::Mpz;
|
||||
let num = Mpz::from(123);
|
||||
let den = Mpz::from(1000);
|
||||
expect!(".123", Expr::Const, Num::Mpq(Mpq::ratio(&num, &den)));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue