mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-18 13:54:36 -05:00
[TESTS] Fix scrollbar/history-test assert argument format.
This commit is contained in:
parent
9f1a19b21e
commit
c7243da062
2 changed files with 16 additions and 16 deletions
|
@ -33,7 +33,7 @@
|
|||
#include <history.h>
|
||||
#include <string.h>
|
||||
|
||||
static int test = 0;
|
||||
static unsigned int test = 0;
|
||||
|
||||
#define TASSERT( a ) { \
|
||||
assert ( a ); \
|
||||
|
|
|
@ -98,38 +98,38 @@ int main ( G_GNUC_UNUSED int argc, G_GNUC_UNUSED char **argv )
|
|||
scrollbar_set_handle_length ( NULL , 1000);
|
||||
|
||||
scrollbar_set_max_value ( sb, 10000);
|
||||
TASSERTE ( sb->length, 10000 );
|
||||
TASSERTE ( sb->length, 10000u );
|
||||
scrollbar_set_handle_length ( sb, 10);
|
||||
TASSERTE ( sb->pos_length, 10 );
|
||||
TASSERTE ( sb->pos_length, 10u );
|
||||
scrollbar_set_handle ( sb , 5000 );
|
||||
TASSERTE ( sb->pos, 5000 );
|
||||
TASSERTE ( sb->pos, 5000u );
|
||||
scrollbar_set_handle ( sb , 15000 );
|
||||
TASSERTE ( sb->pos, 10000 );
|
||||
TASSERTE ( sb->pos, 10000u );
|
||||
scrollbar_set_handle ( sb , UINT32_MAX );
|
||||
TASSERTE ( sb->pos, 10000 );
|
||||
TASSERTE ( sb->pos, 10000u );
|
||||
scrollbar_set_handle_length ( sb, 15000);
|
||||
TASSERTE ( sb->pos_length, 10000 );
|
||||
TASSERTE ( sb->pos_length, 10000u );
|
||||
scrollbar_set_handle_length ( sb, 0);
|
||||
TASSERTE ( sb->pos_length, 1 );
|
||||
TASSERTE ( sb->pos_length, 1u );
|
||||
|
||||
|
||||
guint cl = scrollbar_scroll_get_line ( sb, 10 );
|
||||
TASSERTE ( cl, 1010);
|
||||
TASSERTE ( cl, 1010u);
|
||||
cl = scrollbar_scroll_get_line ( sb, 20 );
|
||||
TASSERTE ( cl, 2020);
|
||||
TASSERTE ( cl, 2020u);
|
||||
cl = scrollbar_scroll_get_line ( sb, 0 );
|
||||
TASSERTE ( cl, 0);
|
||||
TASSERTE ( cl, 0u);
|
||||
cl = scrollbar_scroll_get_line ( sb, 99 );
|
||||
TASSERTE ( cl, 9999);
|
||||
TASSERTE ( cl, 9999u);
|
||||
scrollbar_set_handle_length ( sb, 1000);
|
||||
cl = scrollbar_scroll_get_line ( sb, 10 );
|
||||
TASSERTE ( cl, 555);
|
||||
TASSERTE ( cl, 555u);
|
||||
cl = scrollbar_scroll_get_line ( sb, 20 );
|
||||
TASSERTE ( cl, 1666);
|
||||
TASSERTE ( cl, 1666u);
|
||||
cl = scrollbar_scroll_get_line ( sb, 0 );
|
||||
TASSERTE ( cl, 0);
|
||||
TASSERTE ( cl, 0u);
|
||||
cl = scrollbar_scroll_get_line ( sb, 99 );
|
||||
TASSERTE ( cl, 9999);
|
||||
TASSERTE ( cl, 9999u);
|
||||
|
||||
widget_free( WIDGET (sb ) );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue