aboutsummaryrefslogtreecommitdiff
path: root/src/tests/dump.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2012-11-09 16:25:22 +0000
committerMike Buland <eichlan@xagasoft.com>2012-11-09 16:25:22 +0000
commit74dd68ad611d15abf16a65c36a7cfd3f4492930a (patch)
tree843fed9ba6bb03253a01314afc3b1dfbb2dfd26c /src/tests/dump.cpp
parentd9b407475ae3ebe434b29d9eabdd7d4416e17881 (diff)
downloadlibgats-74dd68ad611d15abf16a65c36a7cfd3f4492930a.tar.gz
libgats-74dd68ad611d15abf16a65c36a7cfd3f4492930a.tar.bz2
libgats-74dd68ad611d15abf16a65c36a7cfd3f4492930a.tar.xz
libgats-74dd68ad611d15abf16a65c36a7cfd3f4492930a.zip
Made the repo less libbu++-centric.
Diffstat (limited to 'src/tests/dump.cpp')
-rw-r--r--src/tests/dump.cpp30
1 files changed, 0 insertions, 30 deletions
diff --git a/src/tests/dump.cpp b/src/tests/dump.cpp
deleted file mode 100644
index e0dcb52..0000000
--- a/src/tests/dump.cpp
+++ /dev/null
@@ -1,30 +0,0 @@
1#include <bu/sio.h>
2#include <bu/file.h>
3#include <gats/gatsstream.h>
4#include <gats/types.h>
5
6using namespace Bu;
7
8int main( int argc, char *argv[] )
9{
10 File fIn( argv[1], File::Read );
11 Gats::GatsStream gsIn( fIn );
12
13 for(;;)
14 {
15 sio << "Reading from file position: " << fIn.tell() << sio.nl;
16 Gats::Object *pObj = gsIn.readObject();
17 if( !pObj )
18 {
19 if( gsIn.hasReadBuffer() )
20 {
21 sio << "Premature end of stream detected, have "
22 << gsIn.getReadBufferSize() << "b." << sio.nl;
23 }
24 return 0;
25 }
26
27 sio << *pObj << sio.nl;
28 }
29}
30