aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/base/database.cpp22
1 files changed, 12 insertions, 10 deletions
diff --git a/test/base/database.cpp b/test/base/database.cpp
index 72b44094..8ba7f44d 100644
--- a/test/base/database.cpp
+++ b/test/base/database.cpp
@@ -26,7 +26,7 @@
#define STAT_DATABASE_TEST
-#include "database.hpp"
+#include "stats_database.hpp"
#include <cppunit/extensions/HelperMacros.h>
#include <ctime>
#include <cstring>
@@ -35,32 +35,34 @@ namespace usdx
{
class StatDatabaseTest : public CppUnit::TestFixture {
CPPUNIT_TEST_SUITE(StatDatabaseTest);
- CPPUNIT_TEST(testNotNull);
+/* CPPUNIT_TEST(testNotNull);
CPPUNIT_TEST(testGetVersion);
CPPUNIT_TEST(testSetAndGetVersion);
CPPUNIT_TEST(testSizeOfTime_t);
CPPUNIT_TEST(testGetStatReset);
+*/
CPPUNIT_TEST(testFormatDate);
- CPPUNIT_TEST(testTableExists);
+/* CPPUNIT_TEST(testTableExists);
CPPUNIT_TEST(testTableNotExists);
CPPUNIT_TEST(testTableColumnExists);
CPPUNIT_TEST(testTableColumnNotExists);
CPPUNIT_TEST(testTableColumnTableNotExists);
+*/
CPPUNIT_TEST_SUITE_END();
private:
StatDatabase *db;
public:
void setUp()
{
- StatDatabase::init("../game/Ultrastar.db");
+// StatDatabase::init("../game/Ultrastar.db");
}
void tearDown()
{
- delete StatDatabase::get_instance();
+// delete StatDatabase::get_instance();
}
- void testNotNull()
+/* void testNotNull()
{
CPPUNIT_ASSERT( NULL != StatDatabase::get_instance() );
}
@@ -88,14 +90,14 @@ namespace usdx
{
CPPUNIT_ASSERT( 1000000000 < StatDatabase::get_instance()->get_stat_reset() );
}
-
+*/
void testFormatDate()
{
char buf[9];
- StatDatabase::get_instance()->format_date(buf, 9, 1262433600);
+ StatDatabase::format_date(buf, 9, 1262433600);
CPPUNIT_ASSERT( strcmp(buf, "13.02.09") );
}
-
+/*
void testTableExists()
{
CPPUNIT_ASSERT( true == StatDatabase::get_instance()->sqlite_table_exists("us_songs") );
@@ -120,7 +122,7 @@ namespace usdx
{
CPPUNIT_ASSERT( false == StatDatabase::get_instance()->sqlite_table_contains_column("abc", "Title") );
}
- };
+*/ };
CPPUNIT_TEST_SUITE_REGISTRATION(StatDatabaseTest);
};