From 366a8063730aa7ae696bcb9cf56eafd13d43dfc0 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Sun, 8 Feb 2009 00:44:10 +0000 Subject: So many updates. I recommend using the new FString iterators instead of direct indexing. It is now many times faster, and requires less overhead. Also, more stuff iterator related in every class. More on that later. --- src/tests/rh.cpp | 52 ---------------------------------------------------- 1 file changed, 52 deletions(-) delete mode 100644 src/tests/rh.cpp (limited to 'src/tests/rh.cpp') diff --git a/src/tests/rh.cpp b/src/tests/rh.cpp deleted file mode 100644 index 70abcb7..0000000 --- a/src/tests/rh.cpp +++ /dev/null @@ -1,52 +0,0 @@ -#include "bu/file.h" -#include "bu/hash.h" -#include "bu/archive.h" -#include "bu/fstring.h" -#include "bu/nids.h" -#include "bu/nidsstream.h" - -int main( int argc, char *argv[] ) -{ - if( argv[1][0] == 'r' ) - { - typedef Bu::Hash Hsh; - - Bu::File fIn( argv[2], Bu::File::Read ); - Bu::Archive ar( fIn, Bu::Archive::load ); - - Hsh h; - ar >> h; - - printf("Read %d.\n", h.getSize() ); - for( Hsh::iterator i = h.begin(); i != h.end(); i++ ) - { - printf(" - \"%s\" = %d\n", i.getKey().getStr(), i.getValue() ); - } - - printf("%d vs. %d\n", h.getSize(), h.getKeys().getSize() ); - } - else if( argv[1][0] == 'n' ) - { - typedef Bu::Hash Hsh; - - Bu::File fIn( argv[2], Bu::File::Read ); - Bu::Nids n( fIn ); - n.initialize(); - Bu::NidsStream sIn = n.openStream( 0 ); - Bu::Archive ar( sIn, Bu::Archive::load ); - - Hsh h; - ar >> h; - - printf("Read %d.\n", h.getSize() ); - for( Hsh::iterator i = h.begin(); i != h.end(); i++ ) - { - printf(" - \"%s\" = %d\n", i.getKey().getStr(), i.getValue() ); - } - - printf("%d vs. %d\n", h.getSize(), h.getKeys().getSize() ); - } - - return 0; -} - -- cgit v1.2.3