musicservices/tsrc/unittest_musicservices/src/unittest_musicservices.cpp
changeset 55 f3930dda3342
parent 22 ecf06a08d4d9
equal deleted inserted replaced
51:560ce2306a17 55:f3930dda3342
    13 *
    13 *
    14 * Description: Unit test for MusicServices
    14 * Description: Unit test for MusicServices
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 #include <hbapplication.h>
    18 #include <qnamespace.h>
    19 #include <hbmainwindow.h>
       
    20 
    19 
    21 
    20 
    22 #include "unittest_musicservices.h"
    21 #include "unittest_musicservices.h"
    23 
    22 
    24 // Do this so we can access all member variables.
    23 // Do this so we can access all member variables.
    32 /*!
    31 /*!
    33  Make our test case a stand-alone executable that runs all the test functions.
    32  Make our test case a stand-alone executable that runs all the test functions.
    34  */
    33  */
    35 int main(int argc, char *argv[])
    34 int main(int argc, char *argv[])
    36 {
    35 {
    37     HbApplication app(argc, argv);
    36 	  QApplication app(argc, argv);
    38     HbMainWindow window;
       
    39 
       
    40     TestMusicServices tv;
    37     TestMusicServices tv;
    41 
    38 
    42     char *pass[3];
    39     if ( argc > 1 ) {
    43     pass[0] = argv[0];
    40         return QTest::qExec( &tv, argc, argv);
    44     pass[1] = "-o";
    41     }
    45     pass[2] = "c:\\data\\unittest_musicservices.txt";
    42     else {
       
    43         char *pass[3];
       
    44         pass[0] = argv[0];
       
    45         pass[1] = "-o";
       
    46         pass[2] = "c:\\data\\unittest_musicservices.txt";
    46 
    47 
    47     int res = QTest::qExec(&tv, 3, pass);
    48         return QTest::qExec(&tv, 3, pass);
    48 
    49     }
    49     return res;
       
    50 }
    50 }
    51 
    51 
    52 TestMusicServices::TestMusicServices()
    52 TestMusicServices::TestMusicServices()
    53     : mTest( 0 )
    53     : mTest( 0 )
    54 {
    54 {