[TESTS] Fix scrollbar/history-test assert argument format.

This commit is contained in:
Dave Davenport 2019-02-02 11:38:33 +01:00
parent 9f1a19b21e
commit c7243da062
2 changed files with 16 additions and 16 deletions

View file

@ -33,7 +33,7 @@
#include <history.h> #include <history.h>
#include <string.h> #include <string.h>
static int test = 0; static unsigned int test = 0;
#define TASSERT( a ) { \ #define TASSERT( a ) { \
assert ( a ); \ assert ( a ); \

View file

@ -98,38 +98,38 @@ int main ( G_GNUC_UNUSED int argc, G_GNUC_UNUSED char **argv )
scrollbar_set_handle_length ( NULL , 1000); scrollbar_set_handle_length ( NULL , 1000);
scrollbar_set_max_value ( sb, 10000); scrollbar_set_max_value ( sb, 10000);
TASSERTE ( sb->length, 10000 ); TASSERTE ( sb->length, 10000u );
scrollbar_set_handle_length ( sb, 10); scrollbar_set_handle_length ( sb, 10);
TASSERTE ( sb->pos_length, 10 ); TASSERTE ( sb->pos_length, 10u );
scrollbar_set_handle ( sb , 5000 ); scrollbar_set_handle ( sb , 5000 );
TASSERTE ( sb->pos, 5000 ); TASSERTE ( sb->pos, 5000u );
scrollbar_set_handle ( sb , 15000 ); scrollbar_set_handle ( sb , 15000 );
TASSERTE ( sb->pos, 10000 ); TASSERTE ( sb->pos, 10000u );
scrollbar_set_handle ( sb , UINT32_MAX ); scrollbar_set_handle ( sb , UINT32_MAX );
TASSERTE ( sb->pos, 10000 ); TASSERTE ( sb->pos, 10000u );
scrollbar_set_handle_length ( sb, 15000); scrollbar_set_handle_length ( sb, 15000);
TASSERTE ( sb->pos_length, 10000 ); TASSERTE ( sb->pos_length, 10000u );
scrollbar_set_handle_length ( sb, 0); scrollbar_set_handle_length ( sb, 0);
TASSERTE ( sb->pos_length, 1 ); TASSERTE ( sb->pos_length, 1u );
guint cl = scrollbar_scroll_get_line ( sb, 10 ); guint cl = scrollbar_scroll_get_line ( sb, 10 );
TASSERTE ( cl, 1010); TASSERTE ( cl, 1010u);
cl = scrollbar_scroll_get_line ( sb, 20 ); cl = scrollbar_scroll_get_line ( sb, 20 );
TASSERTE ( cl, 2020); TASSERTE ( cl, 2020u);
cl = scrollbar_scroll_get_line ( sb, 0 ); cl = scrollbar_scroll_get_line ( sb, 0 );
TASSERTE ( cl, 0); TASSERTE ( cl, 0u);
cl = scrollbar_scroll_get_line ( sb, 99 ); cl = scrollbar_scroll_get_line ( sb, 99 );
TASSERTE ( cl, 9999); TASSERTE ( cl, 9999u);
scrollbar_set_handle_length ( sb, 1000); scrollbar_set_handle_length ( sb, 1000);
cl = scrollbar_scroll_get_line ( sb, 10 ); cl = scrollbar_scroll_get_line ( sb, 10 );
TASSERTE ( cl, 555); TASSERTE ( cl, 555u);
cl = scrollbar_scroll_get_line ( sb, 20 ); cl = scrollbar_scroll_get_line ( sb, 20 );
TASSERTE ( cl, 1666); TASSERTE ( cl, 1666u);
cl = scrollbar_scroll_get_line ( sb, 0 ); cl = scrollbar_scroll_get_line ( sb, 0 );
TASSERTE ( cl, 0); TASSERTE ( cl, 0u);
cl = scrollbar_scroll_get_line ( sb, 99 ); cl = scrollbar_scroll_get_line ( sb, 99 );
TASSERTE ( cl, 9999); TASSERTE ( cl, 9999u);
widget_free( WIDGET (sb ) ); widget_free( WIDGET (sb ) );
} }