no need for separate test file

This commit is contained in:
Daylin Morgan 2023-12-01 06:26:20 -06:00
parent 3759966ea6
commit 19f37ece40
Signed by: daylin
GPG key ID: C1E52E7DD81DF79F

View file

@ -30,14 +30,7 @@ proc partOne*(input: string): int = 0
proc partTwo*(input: string): int = 0 proc partTwo*(input: string): int = 0
when isMainModule: when isMainModule:
echo partOne(example)
echo partOne(input)
echo partTwo(example)
echo partTwo(input)
"""
let test = fmt"""
import std/unittest import std/unittest
import ./solution
suite "day {day}": suite "day {day}":
test "part one": test "part one":
@ -46,11 +39,9 @@ suite "day {day}":
test "part two": test "part two":
check partTwo(example) == 0 check partTwo(example) == 0
check partTwo(input) == 0 check partTwo(input) == 0
""" """
let d = fmt"solutions/day{day:0>2}" let d = fmt"solutions/day{day:0>2}"
writeFile(d / "solution.nim", solution) writeFile(d / "solution.nim", solution)
writeFile(d / "test.nim", test)
proc newDay(year, day: int) = proc newDay(year, day: int) =
let d = fmt"solutions/day{day:0>2}" let d = fmt"solutions/day{day:0>2}"