Fixed tests for xdxf plugin xdxf
authorBartosz Szatkowski <bulislaw@linux.com>
Mon, 9 Aug 2010 06:28:11 +0000 (08:28 +0200)
committerBartosz Szatkowski <bulislaw@linux.com>
Mon, 9 Aug 2010 06:28:11 +0000 (08:28 +0200)
trunk/src/plugins/xdxf/tests/test.cpp

index fb04339..6212e77 100644 (file)
 void XdxfTest::search() {
     /*test for English-Polish dictionary */
     XdxfPlugin xdxfPlugin(this);
+    xdxfPlugin.setPatch("dict.xdxf");
     xdxfPlugin.search("wino");
-   QCOMPARE(xdxfPlugin.search("."), QString("kropka\n"));
-   QCOMPARE(xdxfPlugin.search("1"), QString("one\n"));
+    QCOMPARE(xdxfPlugin.search("."), QString("kropka\n"));
+    QCOMPARE(xdxfPlugin.search("1"), QString("one\n"));
 }
 
 void XdxfTest::searchWordList() {
      /*test for English-Polish dictionary */
     XdxfPlugin xdxfPlugin(this);
+    xdxfPlugin.setPatch("dict.xdxf");
     QList<Translation*> te=xdxfPlugin.searchWordList(".",10);
     if(te.size()>0)
         QCOMPARE(te.at(0)->key(), QString("."));
@@ -56,6 +58,7 @@ void XdxfTest::searchWordList() {
 void XdxfTest::stop() {
     /*test for English-Polish dictionary */
     CommonDictInterface *xdxfPlugin = new XdxfPlugin(this);
+    xdxfPlugin.setPatch("dict.xdxf");
 
     QString string("*");
     QFuture<QList<Translation*> > future = QtConcurrent::run(xdxfPlugin, &CommonDictInterface::searchWordList, string, 10);
@@ -76,6 +79,7 @@ void XdxfTest::getNew() {
 void XdxfTest::langFrom() {
      /*test for English-Polish dictionary */
     XdxfPlugin xdxfPlugin(this);
+    xdxfPlugin.setPatch("dict.xdxf");
     xdxfPlugin.searchWordList("rope",10);
     QCOMPARE(xdxfPlugin.langFrom(), QString("ENG"));
 }