Skip to content

Commit

Permalink
fmt + info
Browse files Browse the repository at this point in the history
  • Loading branch information
qazxcdswe123 authored and bobzhang committed Jun 21, 2024
1 parent d05470a commit 26aaef9
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
9 changes: 8 additions & 1 deletion strconv/bool.mbt
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ test "parse_bool" {
]
for i = 0; i < tests.length(); i = i + 1 {
let t = tests[i]
@assertion.assert_eq(try { Result::Ok(parse_bool(t.0)!)} catch {err => Err(err)} , t.1)?
@assertion.assert_eq(
try {
Result::Ok(parse_bool(t.0)!)
} catch {
err => Err(err)
},
t.1,
)?
}
}
5 changes: 4 additions & 1 deletion strconv/decimal.mbt
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,10 @@ test "parse_decimal" {
let hpd = Decimal::parse_decimal(s)!
inspect(hpd, content=s)?
let hpd = Decimal::parse_decimal("1.0e-100")!
inspect(hpd, content="0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001")?
inspect(
hpd,
content="0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001",
)?
} catch {
err => println(err)
}
Expand Down
4 changes: 2 additions & 2 deletions strconv/strconv.mbti
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package moonbitlang/core/strconv

// Values
fn from_string(String) -> Bool

fn parse[A : FromStr](String) -> A

fn parse_bool(String) -> Bool

fn parse_double(String) -> Double

fn parse_int(String, ~base : Int = ..) -> Int
Expand Down

0 comments on commit 26aaef9

Please sign in to comment.