adds tests

This commit is contained in:
ringabout
2026-03-20 17:28:17 +08:00
parent 1638d1213e
commit 3d869c4a01
2 changed files with 9 additions and 2 deletions

View File

@@ -11,7 +11,6 @@ converter toMeters(f: Feet): Meters =
Meters(float(f) * 0.3048)
proc showMeters(m: Meters) =
doAssert float(m) == 3.048
echo "ok"
showMeters(Feet(10.0))

View File

@@ -32,4 +32,12 @@ proc consume(x: sink BigObj) =
echo x.data.len
var b = BigObj(data: @[1, 2, 3, 4, 5])
consume(move b)
consume(move b)
proc divmod(a, b: int): (int, int) =
(a div b, a mod b)
let (q, r) = divmod(17, 5)
echo q
echo r