summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDave Davenport <qball@gmpclient.org>2017-01-03 12:40:29 +0100
committerDave Davenport <qball@gmpclient.org>2017-01-03 12:40:29 +0100
commitfe0219a02506be3b4be19654058de07d7e979f1b (patch)
treec6a2777bd8c11689c356d58899a055e5ddeff36c /test
parent30726b6c6e32c1fe9cde3fa4ea7acb68839db64c (diff)
Fix the box widget test
Diffstat (limited to 'test')
-rw-r--r--test/box-test.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/test/box-test.c b/test/box-test.c
index 54c0f001..7598bacd 100644
--- a/test/box-test.c
+++ b/test/box-test.c
@@ -133,30 +133,31 @@ int main ( G_GNUC_UNUSED int argc, G_GNUC_UNUSED char **argv )
// TODO should this happen automagically?
widget_update ( WIDGET ( b ) ) ;
TASSERTE ( wid1->w, 20);
- TASSERTE ( wid1->h, 38);
+ TASSERTE ( wid1->h, 48);
TASSERTE ( wid2->w, 20);
- TASSERTE ( wid2->h, 38);
+ TASSERTE ( wid2->h, 48);
TASSERTE ( wid3->w, 20);
- TASSERTE ( wid3->h, 20);
+ TASSERTE ( wid3->h, 0);
widget_resize ( WIDGET (b ), 20, 200 );
TASSERTE ( wid1->w, 20);
- TASSERTE ( wid1->h, 88);
+ TASSERTE ( wid1->h, 98);
TASSERTE ( wid2->w, 20);
- TASSERTE ( wid2->h, 88);
+ TASSERTE ( wid2->h, 98);
TASSERTE ( wid3->w, 20);
- TASSERTE ( wid3->h, 20);
- TASSERTE ( box_get_fixed_pixels ( b ) , 24 );
+ // has no height, gets no height.
+ TASSERTE ( wid3->h, 0);
+ TASSERTE ( box_get_fixed_pixels ( b ) , 4 );
widget *wid4 = g_malloc0(sizeof(widget));
widget_enable ( WIDGET ( wid4 ) );
widget_resize ( WIDGET ( wid4 ), 20, 20 );
box_add ( b , WIDGET( wid4 ), FALSE, TRUE );
- TASSERTE ( wid4->y, 200-20);
+ TASSERTE ( wid4->y, 200);
widget *wid5 = g_malloc0(sizeof(widget));
widget_enable ( WIDGET ( wid5 ) );
widget_resize ( WIDGET ( wid5 ), 20, 20 );
box_add ( b , WIDGET( wid5 ), TRUE, TRUE );
- TASSERTE ( wid5->y, 127);
+ TASSERTE ( wid5->y, 134);
widget_free ( WIDGET ( b ) );
}
{