manpagez: man pages & more
html files: gtkimageview
Home | html | info | man

Directory structure

Directory structure — How the package is organized.

This chapter describes how the files in the GtkImageView source package are organized. The information is mostly useful to those that want to hack on the code.

Directory and listing

docs

Directory that contains all reference documentation.

tests

This directory contains a test suite for GtkImageView along with some example programs.

The ex-*.c programs are simple example programs that demonstrate how the widget is supposed to be used.

interactive.c is small complete image viewer program that demonstrate most of the features GtkImageView has.

The file repo-buildability.py is a Python script that also must be run from the package root directory. It verifies that it is possible to checkout and build GtkImageView.

src

Source code for the widget.

Test suite

GtkImageView has a test suite which is located in the tests directory. Each C program file named test-*.c in that directory is considered part of the test suite. The test suite must first be built before it can be run:


          $ make check
        

Or when using waf:


          $ ./waf build tests
        

From the project root directory, run the test suite by invoking the alltests.py Python script. You should see output like this:


          $ python ./tests/alltests.py
          == test-viewport ==
          test_viewport_when_image_is_completely_visible
          ...
          3 tests passed.
        

If waf is used, then the directory where the test binaries are located must be specified.


          $ python ./tests/alltests.py build/default/tests/
          == test-viewport ==
          test_viewport_when_image_is_completely_visible
          ...
          3 tests passed.
        

All tests should always pass. If some test does not, then there is a bug. GTK-warnings similar to this:


          (lt-test-scrollwin:27870): Gdk-CRITICAL **: gdk_gc_new: assertion `drawable != NULL' failed
        

should also be treated as test failures unless they are explicitly expected. Due to limitations in GTK, there is no way to make them behave like real test failures.

© manpagez.com 2000-2024
Individual documents may contain additional copyright information.