diff options
-rw-r--r-- | src/base/database.hpp | 12 | ||||
-rw-r--r-- | test/base/database.cpp | 4 |
2 files changed, 13 insertions, 3 deletions
diff --git a/src/base/database.hpp b/src/base/database.hpp index e9ebdb20..687537cc 100644 --- a/src/base/database.hpp +++ b/src/base/database.hpp @@ -47,6 +47,15 @@ namespace usdx StatDatabase(std::string filename); static StatDatabase* instance; + + int get_version(void); + void set_version(int version); + +#ifdef STAT_DATABASE_TEST + // for testing private members + friend class StatDatabaseTest; +#endif + public: static StatDatabase* get_instance(); @@ -54,9 +63,6 @@ namespace usdx static void init(const std::string filename); - int get_version(void); - void set_version(int version); - /* void read_score(Song *song); void add_score(Song *song, int level, const char* name, int score); void write_score(Song *song); diff --git a/test/base/database.cpp b/test/base/database.cpp index db15d948..52635687 100644 --- a/test/base/database.cpp +++ b/test/base/database.cpp @@ -24,8 +24,12 @@ * $Id$ */ +#define STAT_DATABASE_TEST + #include "database.hpp" #include <cppunit/extensions/HelperMacros.h> +#include <ctime> +#include <cstring> namespace usdx { |