the test now builds and passes and even works with srcdir!=builddir
coolo is, in case anyone missed it, a build system god whilst i am but the humble jester in that court at least i can add "qttestlib" to my resume now to find someone who'd care ;) svn path=/trunk/KDE/kdebase/workspace/plasma/lib/; revision=458332
This commit is contained in:
parent
3ce6b30e51
commit
f489395711
@ -9,3 +9,7 @@ METASOURCES = AUTO
|
|||||||
|
|
||||||
LDADD = ../libplasma.la -lQtTest_debug
|
LDADD = ../libplasma.la -lQtTest_debug
|
||||||
testAppletInfo_SOURCES = testAppletInfo.cpp
|
testAppletInfo_SOURCES = testAppletInfo.cpp
|
||||||
|
|
||||||
|
check:
|
||||||
|
opwd=$PWD; cd $(srcdir) && $$opwd/testAppletInfo
|
||||||
|
|
||||||
|
@ -36,6 +36,12 @@ TestAppletInfo::TestAppletInfo(QObject* parent)
|
|||||||
uniqueJavascript = new Plasma::AppletInfo(pwd + "/uniqueJavaScriptApplet.desktop");
|
uniqueJavascript = new Plasma::AppletInfo(pwd + "/uniqueJavaScriptApplet.desktop");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TestAppletInfo::~TestAppletInfo()
|
||||||
|
{
|
||||||
|
delete m_instance;
|
||||||
|
delete m_aboutData;
|
||||||
|
}
|
||||||
|
|
||||||
void TestAppletInfo::name_data(QtTestTable &t)
|
void TestAppletInfo::name_data(QtTestTable &t)
|
||||||
{
|
{
|
||||||
t.defineElement("QString", "expected");
|
t.defineElement("QString", "expected");
|
||||||
@ -177,34 +183,34 @@ void TestAppletInfo::unique_data(QtTestTable &t)
|
|||||||
t.defineElement("bool", "actual");
|
t.defineElement("bool", "actual");
|
||||||
|
|
||||||
*t.newData("Non-Unique Native Applet") << notUniqueNative->unique()
|
*t.newData("Non-Unique Native Applet") << notUniqueNative->unique()
|
||||||
<< "nativeApplet.desktop";
|
<< false;
|
||||||
*t.newData("Unique Javascript Applet") << uniqueJavascript->unique()
|
*t.newData("Unique Javascript Applet") << uniqueJavascript->unique()
|
||||||
<< "uniqueJavaScriptApplet.desktop";
|
<< true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TestAppletInfo::unique()
|
void TestAppletInfo::unique()
|
||||||
{
|
{
|
||||||
FETCH(QString, expected);
|
FETCH(bool, expected);
|
||||||
FETCH(QString, actual);
|
FETCH(bool, actual);
|
||||||
|
|
||||||
COMPARE(expected, actual);
|
COMPARE(expected, actual);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TestAppletInfo::hidden_data(QtTestTable &t)
|
void TestAppletInfo::hidden_data(QtTestTable &t)
|
||||||
{
|
{
|
||||||
t.defineElement("QString", "expected");
|
t.defineElement("bool", "expected");
|
||||||
t.defineElement("QString", "actual");
|
t.defineElement("bool", "actual");
|
||||||
|
|
||||||
*t.newData("Non-Unique Native Applet") << notUniqueNative->unique()
|
*t.newData("Non-Unique Native Applet") << notUniqueNative->hidden()
|
||||||
<< "nativeApplet.desktop";
|
<< false;
|
||||||
*t.newData("Unique Javascript Applet") << uniqueJavascript->unique()
|
*t.newData("Unique Javascript Applet") << uniqueJavascript->hidden()
|
||||||
<< "uniqueJavaScriptApplet.desktop";
|
<< true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TestAppletInfo::hidden()
|
void TestAppletInfo::hidden()
|
||||||
{
|
{
|
||||||
FETCH(QString, expected);
|
FETCH(bool, expected);
|
||||||
FETCH(QString, actual);
|
FETCH(bool, actual);
|
||||||
|
|
||||||
COMPARE(expected, actual);
|
COMPARE(expected, actual);
|
||||||
}
|
}
|
||||||
|
@ -35,6 +35,7 @@ class TestAppletInfo: public QObject
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
TestAppletInfo(QObject* parent = 0);
|
TestAppletInfo(QObject* parent = 0);
|
||||||
|
~TestAppletInfo();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void name_data(QtTestTable& t);
|
void name_data(QtTestTable& t);
|
||||||
|
Loading…
Reference in New Issue
Block a user