pixie/tests/test_svg.nim
2020-12-19 18:03:40 -06:00

15 lines
342 B
Nim

import pixie/fileformats/svg, pixie, strformat
const files = [
"triangle01",
"Ghostscript_Tiger"
]
for file in files:
let
original = readFile(&"tests/images/svg/{file}.svg")
image = decodeSvg(original)
gold = readImage(&"tests/images/svg/{file}.png")
doAssert image.data == gold.data
# image.writeFile(&"{file}.png")