From 998099abcc59822e0ca1829ececa2934511a4e5c Mon Sep 17 00:00:00 2001 From: Teo Mrnjavac Date: Sat, 6 Jul 2013 12:31:38 +0200 Subject: [PATCH] Tests! --- tests/TestDatabase.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/TestDatabase.h b/tests/TestDatabase.h index 8ac562769..0c737677f 100644 --- a/tests/TestDatabase.h +++ b/tests/TestDatabase.h @@ -39,14 +39,14 @@ private slots: void testFactories() { Database* db = new Database("test"); - DatabaseCommand* command = 0; + dbcmd_ptr command; // can we check that his ASSERTs?, it's a build in type, one must not register it again // db->registerCommand(); // check that if we request a factory for LogPlayback it really creates a LogPlayback object command = db->commandFactory()->newInstance(); - DatabaseCommand_LogPlayback* lpCmd = qobject_cast< DatabaseCommand_LogPlayback* >( command ); + DatabaseCommand_LogPlayback* lpCmd = qobject_cast< DatabaseCommand_LogPlayback* >( command.data() ); QVERIFY( lpCmd ); // try to handle a third party database command @@ -59,7 +59,7 @@ private slots: // make sure it's available now command = db->commandFactory()->newInstance(); - TestDatabaseCommand* tCmd = qobject_cast< TestDatabaseCommand* >( command ); + TestDatabaseCommand* tCmd = qobject_cast< TestDatabaseCommand* >( command.data() ); QVERIFY( tCmd ); delete db;