From b7a687b08e32adafbb609bec7aa79b54f161ee4c Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Sat, 20 Dec 2008 02:01:44 +0000 Subject: All of the basic, core workings of the Cache are complete, and tested. Even added some more tests and whatnot. A lot happened, but I can't remember everything. Also, Bu::File reports errors in more error cases. --- src/tests/cache.cpp | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) (limited to 'src/tests') diff --git a/src/tests/cache.cpp b/src/tests/cache.cpp index 18e6a95..12b5bf4 100644 --- a/src/tests/cache.cpp +++ b/src/tests/cache.cpp @@ -7,6 +7,7 @@ #include "bu/cache.h" #include "bu/file.h" #include "bu/fstring.h" +#include "bu/cachecalc.h" class Bob { @@ -136,6 +137,29 @@ private: long cLastId; }; +class BobCalc : public Bu::CacheCalc +{ +public: + BobCalc() + { + } + + virtual ~BobCalc() + { + } + + virtual void onLoad( Bob *, const long & ) + { + } + + virtual void onUnload( Bob *, const long & ) + { + } + +private: + +}; + int main( int argc, char *argv[] ) { TRACE( argc, argv ); @@ -148,7 +172,8 @@ int main( int argc, char *argv[] ) return 0; } - BobCache cBob; + BobCalc cc; + BobCache cBob( cc ); cBob.appendStore( new BobStore() ); switch( argv[1][0] ) { -- cgit v1.2.3