mirror of
https://git.sfja.dk/Mikkel/slige.git
synced 2025-01-18 22:46:30 +00:00
11 lines
332 B
TypeScript
11 lines
332 B
TypeScript
import { assertEquals } from "jsr:@std/assert";
|
|
import { stringToInt } from "./program_2.ts";
|
|
|
|
Deno.test("must work", () => {
|
|
assertEquals(stringToInt("0"), 0);
|
|
assertEquals(stringToInt(""), NaN);
|
|
assertEquals(stringToInt("0b10"), 2)
|
|
assertEquals(stringToInt("0x10"), 16)
|
|
assertEquals(stringToInt("010"), 8)
|
|
});
|