Add missing hunk to patch poppler-0.20.3-5.patch

This commit is contained in:
Marek Kasik 2012-11-06 17:39:49 +01:00
parent 44fc7d40d4
commit 46377cbccd
2 changed files with 128 additions and 1 deletions

View File

@ -1531,6 +1531,130 @@ index be8ea35..6286d8c 100644
+
endif
diff --git a/qt4/tests/check_lexer.cpp b/qt4/tests/check_lexer.cpp
new file mode 100644
index 0000000..904be14
--- /dev/null
+++ b/qt4/tests/check_lexer.cpp
@@ -0,0 +1,118 @@
+#include <QtTest/QtTest>
+
+#include "Object.h"
+#include "Lexer.h"
+
+class TestLexer : public QObject
+{
+ Q_OBJECT
+private slots:
+ void testNumbers();
+};
+
+void TestLexer::testNumbers()
+{
+ char *data = "0 1 -1 2147483647 -2147483647 2147483648 -2147483648 4294967297 -2147483649 0.1 1.1 -1.1 2147483647.1 -2147483647.1 2147483648.1 -2147483648.1 4294967297.1 -2147483649.1";
+ Object dummy;
+ MemStream *stream = new MemStream(data, 0, strlen(data), &dummy);
+ Lexer *lexer = new Lexer(NULL, stream);
+ QVERIFY( lexer );
+
+ Object obj;
+
+ lexer->getObj(&obj);
+ QCOMPARE(obj.getType(), objInt);
+ QCOMPARE(obj.getInt(), 0);
+ obj.free();
+
+ lexer->getObj(&obj);
+ QCOMPARE(obj.getType(), objInt);
+ QCOMPARE(obj.getInt(), 1);
+ obj.free();
+
+ lexer->getObj(&obj);
+ QCOMPARE(obj.getType(), objInt);
+ QCOMPARE(obj.getInt(), -1);
+ obj.free();
+
+ lexer->getObj(&obj);
+ QCOMPARE(obj.getType(), objInt);
+ QCOMPARE(obj.getInt(), 2147483647);
+ obj.free();
+
+ lexer->getObj(&obj);
+ QCOMPARE(obj.getType(), objInt);
+ QCOMPARE(obj.getInt(), -2147483647);
+ obj.free();
+
+ lexer->getObj(&obj);
+ QCOMPARE(obj.getType(), objUint);
+ QCOMPARE(obj.getUint(), (unsigned int)2147483648);
+ obj.free();
+
+ lexer->getObj(&obj);
+ QCOMPARE(obj.getType(), objInt);
+ QCOMPARE(obj.getInt(), (int)-2147483648);
+ obj.free();
+
+ lexer->getObj(&obj);
+ QCOMPARE(obj.getType(), objReal);
+ QCOMPARE(obj.getReal(), (double)4294967297);
+ obj.free();
+
+ lexer->getObj(&obj);
+ QCOMPARE(obj.getType(), objReal);
+ QCOMPARE(obj.getReal(), (double)-2147483649);
+ obj.free();
+
+ lexer->getObj(&obj);
+ QCOMPARE(obj.getType(), objReal);
+ QCOMPARE(obj.getReal(), 0.1);
+ obj.free();
+
+ lexer->getObj(&obj);
+ QCOMPARE(obj.getType(), objReal);
+ QCOMPARE(obj.getReal(), 1.1);
+ obj.free();
+
+ lexer->getObj(&obj);
+ QCOMPARE(obj.getType(), objReal);
+ QCOMPARE(obj.getReal(), -1.1);
+ obj.free();
+
+ lexer->getObj(&obj);
+ QCOMPARE(obj.getType(), objReal);
+ QCOMPARE(obj.getReal(), 2147483647.1);
+ obj.free();
+
+ lexer->getObj(&obj);
+ QCOMPARE(obj.getType(), objReal);
+ QCOMPARE(obj.getReal(), -2147483647.1);
+ obj.free();
+
+ lexer->getObj(&obj);
+ QCOMPARE(obj.getType(), objReal);
+ QCOMPARE(obj.getReal(), 2147483648.1);
+ obj.free();
+
+ lexer->getObj(&obj);
+ QCOMPARE(obj.getType(), objReal);
+ QCOMPARE(obj.getReal(), -2147483648.1);
+ obj.free();
+
+ lexer->getObj(&obj);
+ QCOMPARE(obj.getType(), objReal);
+ QCOMPARE(obj.getReal(), 4294967297.1);
+ obj.free();
+
+ lexer->getObj(&obj);
+ QCOMPARE(obj.getType(), objReal);
+ QCOMPARE(obj.getReal(), -2147483649.1);
+ obj.free();
+
+ delete lexer;
+}
+
+QTEST_MAIN(TestLexer)
+#include "check_lexer.moc"
+
diff --git a/splash/Splash.cc b/splash/Splash.cc
index 0e07c70..62d8f8d 100644
--- a/splash/Splash.cc

View File

@ -1,7 +1,7 @@
Summary: PDF rendering library
Name: poppler
Version: 0.20.2
Release: 6%{?dist}
Release: 7%{?dist}
License: (GPLv2 or GPLv3) and GPLv2+ and LGPLv2+ and MIT
Group: Development/Libraries
URL: http://poppler.freedesktop.org/
@ -237,6 +237,9 @@ test "$(pkg-config --modversion poppler-splash)" = "%{version}"
%changelog
* Tue Nov 6 2012 Marek Kasik <mkasik@redhat.com> 0.20.2-7
- Add missing hunk to patch poppler-0.20.3-5.patch
* Tue Nov 6 2012 Marek Kasik <mkasik@redhat.com> 0.20.2-6
- Backport most of the changes from poppler-0.20.3 - poppler-0.20.5
- (those which doesn't change API or ABI and are important)