diff options
author | Tristan Van Berkom <tristan.van.berkom@gmail.com> | 2010-04-08 18:52:12 -0400 |
---|---|---|
committer | Tristan Van Berkom <tristan.van.berkom@gmail.com> | 2010-04-08 18:52:12 -0400 |
commit | 99425f15f5f35d3ae7ab3d3b8b481a9610c22c00 (patch) | |
tree | 153eb2b0fbd6c6d47dea29de4495202ae1bc02bb | |
parent | 1706608de3e23afeef6eb94275850b5ade9df15b (diff) | |
download | gdk-pixbuf-99425f15f5f35d3ae7ab3d3b8b481a9610c22c00.tar.gz |
Added assertions
Added assersions that gtk_extended_layout_get_height_for_width()
methods return minimum sizes lesser than the natural size.
-rw-r--r-- | gtk/gtkextendedlayout.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gtk/gtkextendedlayout.c b/gtk/gtkextendedlayout.c index 8cd0814cd..9b9c9cef0 100644 --- a/gtk/gtkextendedlayout.c +++ b/gtk/gtkextendedlayout.c @@ -23,6 +23,7 @@ #include <config.h> #include "gtkextendedlayout.h" +#include "gtksizegroup.h" #include "gtkintl.h" #include "gtkalias.h" @@ -93,6 +94,8 @@ gtk_extended_layout_get_width_for_height (GtkExtendedLayout *layout, iface = GTK_EXTENDED_LAYOUT_GET_IFACE (layout); iface->get_width_for_height (layout, height, minimum_width, natural_width); + + g_assert (!minimum_width || !natural_width || *minimum_width <= *natural_width); } /** @@ -119,6 +122,8 @@ gtk_extended_layout_get_height_for_width (GtkExtendedLayout *layout, iface = GTK_EXTENDED_LAYOUT_GET_IFACE (layout); iface->get_height_for_width (layout, width, minimum_height, natural_height); + + g_assert (!minimum_height || !natural_height || *minimum_height <= *natural_height); } #define __GTK_EXTENDED_LAYOUT_C__ |