summaryrefslogtreecommitdiffstats
path: root/tests/png.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2009-06-24 21:29:09 +0000
committerTavian Barnes <tavianator@gmail.com>2009-06-24 21:29:09 +0000
commita91667e54e042889de5480dd56b950923837335d (patch)
treec777f770889f95e4619c1bb987eb7e9dd2189d70 /tests/png.c
parent603712c38a127e297eddd23975fb950499a0c10c (diff)
downloaddimension-a91667e54e042889de5480dd56b950923837335d.tar.xz
New convienence libraries for tests.
Diffstat (limited to 'tests/png.c')
-rw-r--r--tests/png.c30
1 files changed, 4 insertions, 26 deletions
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 @@
* <http://www.gnu.org/licenses/>. *
*************************************************************************/
-#include "../libdimension/dimension.h"
+#include "tests.h"
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
@@ -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");