~ubuntu-branches/ubuntu/saucy/emscripten/saucy-proposed

« back to all changes in this revision

Viewing changes to tests/poppler/qt4/tests/check_actualtext.cpp

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2013-05-02 13:11:51 UTC
  • Revision ID: package-import@ubuntu.com-20130502131151-q8dvteqr1ef2x7xz
Tags: upstream-1.4.1~20130504~adb56cb
ImportĀ upstreamĀ versionĀ 1.4.1~20130504~adb56cb

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include <QtTest/QtTest>
 
2
 
 
3
#include <poppler-qt4.h>
 
4
 
 
5
#include <QtCore/QFile>
 
6
 
 
7
class TestActualText: public QObject
 
8
{
 
9
    Q_OBJECT
 
10
private slots:
 
11
    void checkActualText1();
 
12
};
 
13
 
 
14
void TestActualText::checkActualText1()
 
15
{
 
16
    Poppler::Document *doc;
 
17
    doc = Poppler::Document::load("../../../test/unittestcases/WithActualText.pdf");
 
18
    QVERIFY( doc );
 
19
 
 
20
    Poppler::Page *page = doc->page(0);
 
21
    QVERIFY( page );
 
22
 
 
23
    QCOMPARE( page->text(QRectF()), QString("The slow brown fox jumps over the black dog.") );
 
24
 
 
25
    delete page;
 
26
 
 
27
    delete doc;
 
28
}
 
29
 
 
30
QTEST_MAIN(TestActualText)
 
31
 
 
32
#include "check_actualtext.moc"
 
33