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("."));
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);
void XdxfTest::langFrom() {
/*test for English-Polish dictionary */
XdxfPlugin xdxfPlugin(this);
+ xdxfPlugin.setPatch("dict.xdxf");
xdxfPlugin.searchWordList("rope",10);
QCOMPARE(xdxfPlugin.langFrom(), QString("ENG"));
}