From a91667e54e042889de5480dd56b950923837335d Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Wed, 24 Jun 2009 21:29:09 +0000 Subject: New convienence libraries for tests. --- tests/png.c | 30 ++++-------------------------- 1 file changed, 4 insertions(+), 26 deletions(-) (limited to 'tests/png.c') diff --git a/tests/png.c b/tests/png.c index 213e176..b80af04 100644 --- a/tests/png.c +++ b/tests/png.c @@ -18,7 +18,7 @@ * . * *************************************************************************/ -#include "../libdimension/dimension.h" +#include "tests.h" #include #include #include @@ -27,7 +27,6 @@ int main() { dmnsn_canvas *canvas; dmnsn_progress *progress; - double prog; dmnsn_color color; dmnsn_CIE_xyY xyY; dmnsn_CIE_Lab Lab; @@ -118,14 +117,7 @@ main() { return EXIT_FAILURE; } - /* Give an ellipsis progress indication */ - prog = 0.0; - while ((prog += 1.0/10.0) < 1.0) { - dmnsn_wait_progress(progress, prog); - printf("."); - fflush(stdout); - } - printf("\n"); + progressbar("Writing PNG file: ", progress); if (dmnsn_finish_progress(progress) != 0) { fprintf(stderr, "--- Writing canvas to PNG failed! ---\n"); @@ -150,14 +142,7 @@ main() { return EXIT_FAILURE; } - /* Give an ellipsis progress indication */ - prog = 0.0; - while ((prog += 1.0/10.0) < 1.0) { - dmnsn_wait_progress(progress, prog); - printf("."); - fflush(stdout); - } - printf("\n"); + progressbar("Reading PNG file: ", progress); if (dmnsn_finish_progress(progress) != 0) { fprintf(stderr, "--- Reading canvas from PNG failed! ---\n"); @@ -181,14 +166,7 @@ main() { return EXIT_FAILURE; } - /* Give an ellipsis progress indication */ - prog = 0.0; - while ((prog += 1.0/10.0) < 1.0) { - dmnsn_wait_progress(progress, prog); - printf("."); - fflush(stdout); - } - printf("\n"); + progressbar("Writing PNG file: ", progress); if (dmnsn_finish_progress(progress) != 0) { fprintf(stderr, "--- Writing canvas to PNG failed! ---\n"); -- cgit v1.2.3