From 6699dabbb4d80f11504eb1adba350773e101cee9 Mon Sep 17 00:00:00 2001 From: treeform Date: Fri, 8 Jul 2022 23:01:49 -0700 Subject: [PATCH] test_paints --- tests/test_paints.nim | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/tests/test_paints.nim b/tests/test_paints.nim index 8a347c4..1dfcc9f 100644 --- a/tests/test_paints.nim +++ b/tests/test_paints.nim @@ -1,4 +1,4 @@ -import chroma, pixie, vmath +import chroma, pixie, vmath, utils const heartShape = """ M 10,30 @@ -14,7 +14,7 @@ block: heartShape, rgba(255, 0, 0, 255) ) - image.writeFile("tests/paths/paintSolid.png") + image.diffVs("tests/paths/paintSolid.png") block: let paint = newPaint(ImagePaint) @@ -23,7 +23,7 @@ block: let image = newImage(100, 100) image.fillPath(heartShape, paint) - image.writeFile("tests/paths/paintImage.png") + image.diffVs("tests/paths/paintImage.png") block: let paint = newPaint(ImagePaint) @@ -33,7 +33,7 @@ block: let image = newImage(100, 100) image.fillPath(heartShape, paint) - image.writeFile("tests/paths/paintImageOpacity.png") + image.diffVs("tests/paths/paintImageOpacity.png") block: let paint = newPaint(TiledImagePaint) @@ -42,7 +42,7 @@ block: let image = newImage(100, 100) image.fillPath(heartShape, paint) - image.writeFile("tests/paths/paintImageTiled.png") + image.diffVs("tests/paths/paintImageTiled.png") block: let paint = newPaint(TiledImagePaint) @@ -52,7 +52,7 @@ block: let image = newImage(100, 100) image.fillPath(heartShape, paint) - image.writeFile("tests/paths/paintImageTiledOpacity.png") + image.diffVs("tests/paths/paintImageTiledOpacity.png") block: let paint = newPaint(LinearGradientPaint) @@ -67,7 +67,7 @@ block: let image = newImage(100, 100) image.fillPath(heartShape, paint) - image.writeFile("tests/paths/gradientLinear.png") + image.diffVs("tests/paths/gradientLinear.png") block: let paint = newPaint(LinearGradientPaint) @@ -82,7 +82,7 @@ block: let image = newImage(100, 100) image.fillPath(heartShape, paint) - image.writeFile("tests/paths/gradientLinear2.png") + image.diffVs("tests/paths/gradientLinear2.png") block: let paint = newPaint(RadialGradientPaint) @@ -98,7 +98,7 @@ block: let image = newImage(100, 100) image.fillPath(heartShape, paint) - image.writeFile("tests/paths/gradientRadial.png") + image.diffVs("tests/paths/gradientRadial.png") block: let paint = newPaint(AngularGradientPaint) @@ -114,7 +114,7 @@ block: let image = newImage(100, 100) image.fillPath(heartShape, paint) - image.writeFile("tests/paths/gradientAngular.png") + image.diffVs("tests/paths/gradientAngular.png") block: let paint = newPaint(AngularGradientPaint) @@ -131,4 +131,4 @@ block: let image = newImage(100, 100) image.fillPath(heartShape, paint) - image.writeFile("tests/paths/gradientAngularOpacity.png") + image.diffVs("tests/paths/gradientAngularOpacity.png")