mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-27 22:20:24 +00:00
42450cacd9
GtkArrow and the align properties use different methods (float vs int) to center the arrow. If the size of the arrow is odd, this will cause a rendering that differs by half a pixel. So we request an even size for both the arrow and the container and everything works out. |
||
---|---|---|
.. | ||
alignment-props.css | ||
alignment-props.ref.ui | ||
alignment-props.ui | ||
box-expand.css | ||
box-expand.ref.ui | ||
box-expand.ui | ||
box-packing.css | ||
box-packing.ref.ui | ||
box-packing.ui | ||
entry-progress-coloring.css | ||
entry-progress-coloring.ref.ui | ||
entry-progress-coloring.ui | ||
grid-expand.css | ||
grid-expand.ref.ui | ||
grid-expand.ui | ||
grid-homogeneous.css | ||
grid-homogeneous.ref.ui | ||
grid-homogeneous.ui | ||
gtk-reftest.c | ||
label-sizing.css | ||
label-sizing.ref.ui | ||
label-sizing.ui | ||
label-small-ellipsized.ref.ui | ||
label-small-ellipsized.ui | ||
label-wrap-justify.ref.ui | ||
label-wrap-justify.ui | ||
Makefile.am | ||
misc-alignment.ref.ui | ||
misc-alignment.ui | ||
nonresizable-size.ref.ui | ||
nonresizable-size.ui | ||
quit-mnemonic.ref.ui | ||
quit-mnemonic.ui | ||
README | ||
simple.ref.ui | ||
simple.ui | ||
toplevel-vs-popup.ref.ui | ||
toplevel-vs-popup.ui |
gtk-reftest is a new test runner supposed to do a lot of generic tests. Run it like this: ./gtk-reftest [OPTIONS] TESTFILE [TESTFILES...] where FILE is a GtkBuilder ui file to run. For a general test named "test", you want to have the following files: 1) test.ui 2) test.ref.ui 3) test.css (optional) The test will then check that test.ui and test.ref.ui are rendered identically with the provided css. In detail, for every provided TESTFILE the test runner will: 1) Add the css to the default screen 2) Load the test.ui file and the test.ref.ui file 3) Grab the first GtkWindow subclass widget 4) gtk_widget_show() it and take a snapshot image of its contents into a cairo surface. 5) Compare the two images to be bitwise identical. If they are not, a diff image will be created hilighting the differences. 6) Save the images as png files to the output directory named: - test.out.png (rendering of test.ui) - test.ref.png (rendering of test.ref.ui) - test.diff.png (optional, differences from step 5) 7) Fail the test if the two images are not bitwise identical Credit for the idea of reftests goes to Mozilla and in particular David Baron. For a larger introduction of why reftests are useful, see http://weblogs.mozillazine.org/roc/archives/2008/12/reftests.html