import { assertEquals } from "jsr:@std/assert";
import { stringToInt } from "./program_2.ts";

Deno.test("must work", () => {
    assertEquals(stringToInt("0"), 0);
    assertEquals(stringToInt("10"), 10);
    assertEquals(stringToInt("0b110"), 6);
    assertEquals(stringToInt("071"), 57);
    assertEquals(stringToInt("0xaa"), 170);
    assertEquals(stringToInt("john"), NaN);
});
