summaryrefslogtreecommitdiff
path: root/qt4/tests
diff options
context:
space:
mode:
Diffstat (limited to 'qt4/tests')
-rw-r--r--qt4/tests/Makefile.am22
-rw-r--r--qt4/tests/check_pagemode_attach.cpp22
-rw-r--r--qt4/tests/check_pagemode_fullscreen.cpp22
-rw-r--r--qt4/tests/check_pagemode_none.cpp22
-rw-r--r--qt4/tests/check_pagemode_oc.cpp22
-rw-r--r--qt4/tests/check_pagemode_thumbs.cpp22
6 files changed, 131 insertions, 1 deletions
diff --git a/qt4/tests/Makefile.am b/qt4/tests/Makefile.am
index 8d790b8e..59361ea0 100644
--- a/qt4/tests/Makefile.am
+++ b/qt4/tests/Makefile.am
@@ -35,7 +35,12 @@ TESTS = \
check_author \
check_orientation \
check_permissions \
- check_linearised
+ check_linearised \
+ check_pagemode_fullscreen \
+ check_pagemode_attach \
+ check_pagemode_none \
+ check_pagemode_thumbs \
+ check_pagemode_oc
check_PROGRAMS = $(TESTS)
@@ -51,3 +56,18 @@ check_author_LDADD = $(LDADDS)
check_permissions_SOURCES = check_permissions.cpp
check_permissions_LDADD = $(LDADDS)
+
+check_pagemode_fullscreen_SOURCES = check_pagemode_fullscreen.cpp
+check_pagemode_fullscreen_LDADD = $(LDADDS)
+
+check_pagemode_attach_SOURCES = check_pagemode_attach.cpp
+check_pagemode_attach_LDADD = $(LDADDS)
+
+check_pagemode_none_SOURCES = check_pagemode_none.cpp
+check_pagemode_none_LDADD = $(LDADDS)
+
+check_pagemode_thumbs_SOURCES = check_pagemode_thumbs.cpp
+check_pagemode_thumbs_LDADD = $(LDADDS)
+
+check_pagemode_oc_SOURCES = check_pagemode_oc.cpp
+check_pagemode_oc_LDADD = $(LDADDS)
diff --git a/qt4/tests/check_pagemode_attach.cpp b/qt4/tests/check_pagemode_attach.cpp
new file mode 100644
index 00000000..eea7cf2a
--- /dev/null
+++ b/qt4/tests/check_pagemode_attach.cpp
@@ -0,0 +1,22 @@
+#include <QtCore/QtCore>
+
+#define UNSTABLE_POPPLER_QT4
+#include <poppler-qt4.h>
+
+int main( int argc, char **argv )
+{
+ QCoreApplication a( argc, argv ); // QApplication required!
+
+ Poppler::Document *doc = Poppler::Document::load("../../../test/unittestcases/UseAttachments.pdf");
+ if (!doc)
+ {
+ exit(1);
+ }
+
+ if ( !(doc->pageMode() == Poppler::Document::UseAttach ) )
+ {
+ exit(1);
+ }
+
+ exit(0);
+}
diff --git a/qt4/tests/check_pagemode_fullscreen.cpp b/qt4/tests/check_pagemode_fullscreen.cpp
new file mode 100644
index 00000000..75fc8cc2
--- /dev/null
+++ b/qt4/tests/check_pagemode_fullscreen.cpp
@@ -0,0 +1,22 @@
+#include <QtCore/QtCore>
+
+#define UNSTABLE_POPPLER_QT4
+#include <poppler-qt4.h>
+
+int main( int argc, char **argv )
+{
+ QCoreApplication a( argc, argv ); // QApplication required!
+
+ Poppler::Document *doc = Poppler::Document::load("../../../test/unittestcases/FullScreen.pdf");
+ if (!doc)
+ {
+ exit(1);
+ }
+
+ if ( !(doc->pageMode() == Poppler::Document::FullScreen ) )
+ {
+ exit(1);
+ }
+
+ exit(0);
+}
diff --git a/qt4/tests/check_pagemode_none.cpp b/qt4/tests/check_pagemode_none.cpp
new file mode 100644
index 00000000..1c7bbdfc
--- /dev/null
+++ b/qt4/tests/check_pagemode_none.cpp
@@ -0,0 +1,22 @@
+#include <QtCore/QtCore>
+
+#define UNSTABLE_POPPLER_QT4
+#include <poppler-qt4.h>
+
+int main( int argc, char **argv )
+{
+ QCoreApplication a( argc, argv ); // QApplication required!
+
+ Poppler::Document *doc = Poppler::Document::load("../../../test/unittestcases/UseNone.pdf");
+ if (!doc)
+ {
+ exit(1);
+ }
+
+ if ( !(doc->pageMode() == Poppler::Document::UseNone ) )
+ {
+ exit(1);
+ }
+
+ exit(0);
+}
diff --git a/qt4/tests/check_pagemode_oc.cpp b/qt4/tests/check_pagemode_oc.cpp
new file mode 100644
index 00000000..a772c414
--- /dev/null
+++ b/qt4/tests/check_pagemode_oc.cpp
@@ -0,0 +1,22 @@
+#include <QtCore/QtCore>
+
+#define UNSTABLE_POPPLER_QT4
+#include <poppler-qt4.h>
+
+int main( int argc, char **argv )
+{
+ QCoreApplication a( argc, argv ); // QApplication required!
+
+ Poppler::Document *doc = Poppler::Document::load("../../../test/unittestcases/UseOC.pdf");
+ if (!doc)
+ {
+ exit(1);
+ }
+
+ if ( !(doc->pageMode() == Poppler::Document::UseOC ) )
+ {
+ exit(1);
+ }
+
+ exit(0);
+}
diff --git a/qt4/tests/check_pagemode_thumbs.cpp b/qt4/tests/check_pagemode_thumbs.cpp
new file mode 100644
index 00000000..af1f7043
--- /dev/null
+++ b/qt4/tests/check_pagemode_thumbs.cpp
@@ -0,0 +1,22 @@
+#include <QtCore/QtCore>
+
+#define UNSTABLE_POPPLER_QT4
+#include <poppler-qt4.h>
+
+int main( int argc, char **argv )
+{
+ QCoreApplication a( argc, argv ); // QApplication required!
+
+ Poppler::Document *doc = Poppler::Document::load("../../../test/unittestcases/UseThumbs.pdf");
+ if (!doc)
+ {
+ exit(1);
+ }
+
+ if ( !(doc->pageMode() == Poppler::Document::UseThumbs ) )
+ {
+ exit(1);
+ }
+
+ exit(0);
+}