diff --git a/strconv/decimal.mbt b/strconv/decimal.mbt index 69ab544a1..7173daaeb 100644 --- a/strconv/decimal.mbt +++ b/strconv/decimal.mbt @@ -601,6 +601,16 @@ fn Decimal::to_string(self : Decimal) -> String { Show::to_string(self) } +test "from_int64" { + let d = Decimal::from_int64(-1) + inspect!(d.to_string(), content="0") +} + +test "to_string" { + let d = parse_decimal!("-1") + inspect!(d.to_string(), content="1") +} + test "new" { let hpd = Decimal::from_int64(1L) assert_eq!(hpd.digits.length(), 800)