summaryrefslogtreecommitdiffstats
path: root/tests/pngxx.cpp
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/pngxx.cpp
parent603712c38a127e297eddd23975fb950499a0c10c (diff)
downloaddimension-a91667e54e042889de5480dd56b950923837335d.tar.xz
New convienence libraries for tests.
Diffstat (limited to 'tests/pngxx.cpp')
-rw-r--r--tests/pngxx.cpp28
1 files changed, 4 insertions, 24 deletions
diff --git a/tests/pngxx.cpp b/tests/pngxx.cpp
index 2bb9fdb..4a99370 100644
--- a/tests/pngxx.cpp
+++ b/tests/pngxx.cpp
@@ -18,9 +18,8 @@
* <http://www.gnu.org/licenses/>. *
*************************************************************************/
-#include "../libdimensionxx/dimensionxx.hpp"
+#include "testsxx.hpp"
#include <fstream>
-#include <iostream>
int
main()
@@ -95,14 +94,7 @@ main()
}
Dimension::Progress progress = ocanvas.write_async();
-
- // Display ellipsis progress bar
- double prog = 0.0;
- while ((prog += 1.0/10.0) <= 1.0) {
- progress.wait(prog);
- std::cout << "." << std::flush;
- }
- std::cout << std::endl;
+ std::cout << "Writing PNG file: " << progress << std::endl;
}
std::ifstream ifstr("dimensionxx1.png", std::ios::binary);
@@ -110,24 +102,12 @@ main()
Dimension::Progress iprogress
= Dimension::PNG_Canvas::read_async(ifstr);
-
- double iprog = 0.0;
- while ((iprog += 1.0/10.0) <= 1.0) {
- iprogress.wait(iprog);
- std::cout << "." << std::flush;
- }
- std::cout << std::endl;
+ std::cout << "Reading PNG file: " << iprogress << std::endl;
Dimension::PNG_Canvas iocanvas(iprogress, ofstr);
Dimension::Progress oprogress = iocanvas.write_async();
-
- double oprog = 0.0;
- while ((oprog += 1.0/10.0) <= 1.0) {
- oprogress.wait(oprog);
- std::cout << "." << std::flush;
- }
- std::cout << std::endl;
+ std::cout << "Writing PNG file: " << oprogress << std::endl;
return 0;
}