messagingapp/msgnotifications/msgnotifier/tsrc/unittest_mmsplugin/testmmsgplugin/src/testmmsplugin.cpp
--- a/messagingapp/msgnotifications/msgnotifier/tsrc/unittest_mmsplugin/testmmsgplugin/src/testmmsplugin.cpp Tue Aug 03 21:34:40 2010 +0530
+++ b/messagingapp/msgnotifications/msgnotifier/tsrc/unittest_mmsplugin/testmmsgplugin/src/testmmsplugin.cpp Fri Aug 06 23:19:50 2010 +0530
@@ -29,15 +29,6 @@
-//out put directory for test results.
-QString OUTPUTDIRECTORY = "c:/logs/testmmsplugin";
-//o/p directory for data to be written on temp file.
-QString TEMPDIR = "c:/logs/testmmsplugin/testdata";
-//test result O/P file name.
-QString RESULTFILE = "c:/logs/testmmsplugin/result_%1.txt";
-// folder named UID3 of testmmsplugin inside private folder.
-const QString PRIVATE_DIR("C:/private/E4c5e8b4");
-
//factory method to create objects.
QObject* getObject(QString className)
{
@@ -51,60 +42,33 @@
}
}
-//creating o/p directory.
-void createOutPutDirectory()
- {
- QDir dir;
- //o/p dir
- dir.mkdir(OUTPUTDIRECTORY);
- //tmp dir
- dir.mkdir(TEMPDIR);
- // dir inside private folder.
- dir.mkdir(PRIVATE_DIR);
- }
-
//main entry point
int main(int argc, char *argv[])
{
int ret = -1;
- QCoreApplication app(argc, argv);
-
- //creating output directory.
- createOutPutDirectory();
-
- //the configuration file.
- QFile data("c:/testmmsplugin.cfg");
-
+ QCoreApplication app(argc, argv);
+
+ //the configuration file.
+ QFile data("c:/testmmsplugin.cfg");
if (data.open(QFile::ReadOnly))
{
- QTextStream in(&data);
- while(!in.atEnd())
- {
- QStringList args;
- QString appName = argv[0];
- args << appName;
-
- QString option = "-o";
- args << option;
+ QTextStream in(&data);
+ while(!in.atEnd())
+ {
+ QString name = in.readLine();
+ QObject* tc = getObject(name);
+
+ if(tc)
+ {
+ ret = QTest::qExec(tc, argc, argv);
+ delete tc;
+ }
+ }
+ }
+ return ret;
- QString outFile = RESULTFILE;
- QString name = in.readLine();
- outFile = outFile.arg(name);
- args << outFile;
-
- QObject* tc = getObject(name);
+ }
- if(tc)
- {
-
- ret = QTest::qExec(tc, args);
- delete tc;
- }
- }
- }
- data.close();
- return ret;
- }