From c57c34e7438d4aa610eab43d29398b26fa6e21e9 Mon Sep 17 00:00:00 2001 From: mertcandav Date: Thu, 17 Oct 2024 14:14:47 +0300 Subject: [PATCH] std/internal/conv: add tests for the Itoa function --- std/internal/conv/itoa_test.jule | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/std/internal/conv/itoa_test.jule b/std/internal/conv/itoa_test.jule index b9477ba53..57de7e4ff 100644 --- a/std/internal/conv/itoa_test.jule +++ b/std/internal/conv/itoa_test.jule @@ -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 {