~ubuntu-branches/ubuntu/vivid/emscripten/vivid

« back to all changes in this revision

Viewing changes to tests/poppler/qt4/tests/check_pagelayout.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
class TestPageLayout: public QObject
 
6
{
 
7
    Q_OBJECT
 
8
private slots:
 
9
    void checkNone();
 
10
    void checkSingle();
 
11
    void checkFacing();
 
12
};
 
13
 
 
14
void TestPageLayout::checkNone()
 
15
{
 
16
    Poppler::Document *doc;
 
17
    doc = Poppler::Document::load("../../../test/unittestcases/UseNone.pdf");
 
18
    QVERIFY( doc );
 
19
  
 
20
    QCOMPARE( doc->pageLayout(), Poppler::Document::NoLayout );
 
21
 
 
22
    delete doc;
 
23
}
 
24
 
 
25
void TestPageLayout::checkSingle()
 
26
{
 
27
    Poppler::Document *doc;
 
28
    doc = Poppler::Document::load("../../../test/unittestcases/FullScreen.pdf");
 
29
    QVERIFY( doc );
 
30
  
 
31
    QCOMPARE( doc->pageLayout(), Poppler::Document::SinglePage );
 
32
 
 
33
    delete doc;
 
34
}
 
35
 
 
36
void TestPageLayout::checkFacing()
 
37
{
 
38
    Poppler::Document *doc;
 
39
    doc = Poppler::Document::load("../../../test/unittestcases/doublepage.pdf");
 
40
    QVERIFY( doc );
 
41
 
 
42
    QCOMPARE( doc->pageLayout(), Poppler::Document::TwoPageRight );
 
43
 
 
44
    delete doc;
 
45
}
 
46
 
 
47
QTEST_MAIN(TestPageLayout)
 
48
#include "check_pagelayout.moc"
 
49