Hi, In <[EMAIL PROTECTED]> "Re: [poppler] unit test for GLib bindings" on Wed, 15 Oct 2008 17:21:53 +0200, Carlos Garcia Campos <[EMAIL PROTECTED]> wrote:
> El mié, 15-10-2008 a las 22:33 +0900, Kouhei Sutou escribió: > > Hi, > > > > I've moved a git repository of Poppler's GLib bindings tests > > to GitHub: > > http://github.com/kou/poppler-test/tree/master > > Great! I tried the old one and it didn't work. I'll try with this one as > soon as I find some time. In any case, thank you very much for this, we > could probably include it in the poppler repository. I think it'd be > great to get used to writing tests when adding new methods to the API. I hope so too. If you get any problems to run the tests, please tell me. I'll fix it. Thanks, -- kou > > And it requires Cutter 1.0.5: > > % wget > > http://nchc.dl.sourceforge.net/sourceforge/cutter/cutter-1.0.5.tar.gz > > % tar xvfz cutter-1.0.5.tar.gz > > % cd cutter-1.0.5 > > % ./configure > > % make > > % sudo make install > > % cd - > > % git clone git://github.com/kou/poppler-test.git > > % cd poppler-test > > % ./autogen.sh # You may need to add '-I /usr/local/share/aclocal' > > # to ACLOCAL_AMFLAGS in Makefile.am to find cutter.m4. > > % ./configure # Confirm "checking for CUTTER... yes". > > % make > > % make check -s > > > > The tests covers functions that are used in > > test-poppler-glib.cc and all functions of > > poppler-form-field.h. A test for > > poppler_page_render_to_pixbuf() shows diff between expected > > image and actual image if they are not equal. > > > > Image diff sample: > > expected: http://cutter.sourceforge.net/reference/dark-circle.png > > actual: http://cutter.sourceforge.net/reference/nested-circle.png > > diff: > > http://cutter.sourceforge.net/reference/diff-dark-and-nested-circle.png > > > > There are tests for the following functions in glib/test/: > > * glib/test/test-document.c: > > * poppler_document_new_from_file() > > * poopler_document_new_from_data() > > * poppler_document_save() > > * poppler_document_save_a_copy() > > * PopplerDocument's properties (title, format, and so on) > > * poppler_font_info_new() > > * poppler_font_info_scan() > > * poppler_fonts_iter_get_name() > > * poppler_index_item_new() > > * poppler_index_iter_get_action() > > * poppler_index_iter_get_child() > > * poppler_index_iter_next() > > * glib/test/test-form-field.c (all of poppler-form-field.h): > > * poppler_form_field_get_filed_type() > > * poppler_form_field_get_id() > > * poppler_form_field_get_font_size() > > * poppler_form_field_is_read_only() > > * poppler_form_field_button_get_button_type() > > * poppler_form_field_button_get_state() > > * poppler_form_field_button_set_state() > > * poppler_form_field_text_get_text_type() > > * poppler_form_field_text_get_text() > > * poppler_form_field_text_set_text() > > * poppler_form_field_text_get_max_len() > > * poppler_form_field_text_do_spell_check() > > * poppler_form_field_text_do_scroll() > > * poppler_form_field_text_is_rich_text() > > * poppler_form_field_text_is_password() > > * poppler_form_field_choice_get_choice_type() > > * poppler_form_field_choice_is_editable() > > * poppler_form_field_choice_can_select_multiple() > > * poppler_form_field_choice_do_spell_check() > > * poppler_form_field_choice_commit_on_change() > > * poppler_form_field_choice_get_n_items() > > * poppler_form_field_choice_get_item() > > * poppler_form_field_choice_is_item_selected() > > * poppler_form_field_choice_select_item() > > * poppler_form_field_choice_unselect_all() > > * poppler_form_field_choice_toggle_item() > > * poppler_form_field_choice_get_text() > > * poppler_form_field_choice_set_text() > > * glib/test/test-page.c: > > * poppler_document_get_page() > > * poppler_page_get_size() > > * poppler_page_get_index() > > * poppler_page_get_text() > > * poppler_page_get_form_field_mapping() > > * poppler_page_get_transition() > > * PopplerPageTransition's all fields. > > * poppler_page_render_to_pixbuf() with image diff. > > > > > > Thanks, > > -- > > kou > > > > In <[EMAIL PROTECTED]> > > "[poppler] unit test for GLib bindings" on Fri, 12 Sep 2008 22:49:16 > > +0900 (JST), > > Kouhei Sutou <[EMAIL PROTECTED]> wrote: > > > > > Hi, > > > > > > I started to write unit test for GLib bindings by Cutter(*): > > > > > > % wget > > > http://nchc.dl.sourceforge.net/sourceforge/cutter/cutter-1.0.4.tar.gz > > > % tar xvfz cutter-1.0.4.tar.gz > > > % cd cutter-1.0.4 > > > % ./configure > > > % make > > > % sudo make install > > > % cd - > > > % git clone http://pub.cozmixng.org/~kou/repos/poppler poppler-test > > > % cd poppler-test > > > % ./autogen.sh # You may need to add '-I /usr/local/share/aclocal' > > > # to ACLOCAL_AMFLAGS in Makefile.am to find cutter.m4. > > > % ./configure # Confirm "checking for CUTTER... yes". > > > % make > > > % make check -s > > > > > > glib/test/test-*.c are unit test sources. > > > > > > > > > (*) http://cutter.sourceforge.net/ > > > > > > Cutter is a xUnit family unit testing framework for C. It's > > > the most advantage of using Cutter that you can continue to > > > write tests. Because you can write tests easily with Cutter. > > > > > > > > > Thanks, > > > -- > > > kou > > > _______________________________________________ > > > poppler mailing list > > > [email protected] > > > http://lists.freedesktop.org/mailman/listinfo/poppler > > _______________________________________________ > > poppler mailing list > > [email protected] > > http://lists.freedesktop.org/mailman/listinfo/poppler > > -- > Carlos Garcia Campos > [EMAIL PROTECTED] > [EMAIL PROTECTED] > http://carlosgc.linups.org > PGP key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x523E6462 _______________________________________________ poppler mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/poppler
