pdf-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pdf-devel] Testing Filters


From: 杨常华
Subject: Re: [pdf-devel] Testing Filters
Date: Sat, 13 Dec 2008 00:42:16 +0800

So we should supply the test data anyhow we got it?

2008/12/11 <address@hidden>

Hello Vivek.

  How do we test the filters we have implemented?

To make informal tests we usually add support for the new filter to
util/pdf-filter.[ch] and then something like:

  $ echo -n "abc" | ./utils/pdf-filter --cache=1 \
              --jbig2-globals=myglobals.dat --jbig2dec

  $ cat foo.dat | ./utils/pdf-filter --flateenc --ahexenc --ahexdec \
              --flatedec

  ... etc

Regarding formal testing, the unit tests for the pdf_stm_read and
pdf_stm_write functions are in torture/unit/base/stm/pdf-stm-read.c
and torture/unit/base/stm/pdf-stm-write.c The unit tests of these
functions should be extended to cover all the filters in both reading
and writing modes. You will find test cases testing filters in the
previous files.

Don't forget to add the tests descriptions in doc/gnupdf-tsd.texi
before to write them! Also, please see the email
http://lists.gnu.org/archive/html/pdf-devel/2008-11/msg00134.html that
describes how to use the torture/tortutils library and how to
incorporate test data files to the library.

Hope this helps.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]