Skip to content

Commit

Permalink
std/internal/conv: add tests for the Itoa function
Browse files Browse the repository at this point in the history
  • Loading branch information
mertcandav committed Oct 17, 2024
1 parent 0281f77 commit c57c34e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions std/internal/conv/itoa_test.jule
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,16 @@ static casesUtoa: []utoaCase = [
{0, "0"},
]

#test
fn testItoa(t: &testing::T) {
for _, case in casesItoa {
s := Itoa(case.i)
if s != case.s {
t.Errorf("expected {} for {}, found {}", case.s, case.i, s)
}
}
}

#test
fn testUtoa(t: &testing::T) {
for _, case in casesUtoa {
Expand Down

0 comments on commit c57c34e

Please sign in to comment.