Commit 377c023d authored by Brad Hards's avatar Brad Hards
Browse files

Add unit tests for the isLinearized() property.

parent 5fa86988
2005-07-06 Brad Hards <bradh@frogmouth.net>
* qt4/tests/Makefile.am:
* qt4/tests/check_linearised.cpp: Added unit test for linearised
property
* qt4/tests/poppler-fonts.cpp (main): update to reflect API change,
and also to show "[none]" if the font is nameless.
......
......@@ -34,7 +34,8 @@ stress_poppler_qt4_LDADD = $(LDADDS)
TESTS = \
check_author \
check_orientation \
check_permissions
check_permissions \
check_linearised
check_PROGRAMS = $(TESTS)
......@@ -42,6 +43,9 @@ check_PROGRAMS = $(TESTS)
check_orientation_SOURCES = check_orientation.cpp
check_orientation_LDADD = $(LDADDS)
check_linearised_SOURCES = check_linearised.cpp
check_linearised_LDADD = $(LDADDS)
check_author_SOURCES = check_author.cpp
check_author_LDADD = $(LDADDS)
......
#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/orientation.pdf");
if (!doc)
{
exit(1);
}
// It is supposed to be linearised
if ( !(doc->isLinearized() ) )
{
exit(2);
}
exit(0);
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment