root/trunk/tests/PDFDocumentTest.h

Revision 155, 2.1 kB (checked in by jordi, 2 years ago)

The PDF document now can actually search for a text in a page and return the rectangles with the position of the found text. The rectangle is kept in a new class called DocumentRectangle? that just holds the rectangle corners' coordinates.

The DocumentLink? class has been also updated to use the new DocumentRectangle? class instead of holding the rectangles coordinates by itself.

Line 
1 // ePDFView - PDF Document Test Fixture.
2 // Copyright (C) 2006 Emma's Software.
3 //
4 // This program is free software; you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation; either version 2 of the License, or
7 // (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 // GNU General Public License for more details.
13 //
14 // You should have received a copy of the GNU General Public License
15 // along with this program; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17
18 #if !defined (__PDF_DOCUMENT_TEST_H__)
19 #define __PDF_DOCUMENT_TEST_H__
20
21 #include <cppunit/extensions/HelperMacros.h>
22
23 namespace ePDFView
24 {
25     class PDFDocumentTest: public CppUnit::TestFixture
26     {
27         CPPUNIT_TEST_SUITE (PDFDocumentTest);
28         CPPUNIT_TEST (emptyDocument);
29         CPPUNIT_TEST (fileNotFound);
30         CPPUNIT_TEST (invalidFile);
31         CPPUNIT_TEST (encryptedFile);
32         CPPUNIT_TEST (validFile);
33         CPPUNIT_TEST (relativePath);
34         CPPUNIT_TEST (pageChange);
35         CPPUNIT_TEST (pageRotate);
36         CPPUNIT_TEST (pageZoom);
37         CPPUNIT_TEST (pageRender);
38         CPPUNIT_TEST (pageLinks);
39         CPPUNIT_TEST (pageFindText);
40         CPPUNIT_TEST_SUITE_END ();
41
42         public:
43             void setUp (void);
44             void tearDown (void);
45
46             void emptyDocument (void);
47             void fileNotFound (void);
48             void invalidFile (void);
49             void encryptedFile (void);
50             void validFile (void);
51             void relativePath (void);
52             void pageChange (void);
53             void pageRotate (void);
54             void pageZoom (void);
55             void pageRender (void);
56             void pageLinks (void);
57             void pageFindText (void);
58            
59         private:
60             PDFDocument *m_Document;
61             DumbDocumentObserver *m_Observer;
62     };
63 }
64
65 #endif // !__PDF_DOCUMENT_TEST_H__
Note: See TracBrowser for help on using the browser.