diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2015-09-17 09:30:59 +0200 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2015-09-17 09:30:59 +0200 |
commit | 38eb9f05155c2584b326ba82f7cb99919b86c86a (patch) | |
tree | 1227061482ae19c29ac3cc378e557c4d198bdd8c /tests | |
parent | 9d39a3de85ddde5d3271b17e793291fcecc88cff (diff) | |
download | cssh-38eb9f05155c2584b326ba82f7cb99919b86c86a.tar.gz cssh-38eb9f05155c2584b326ba82f7cb99919b86c86a.tar.bz2 |
wrong location for 'P' option (ggo.in, not ggo)
more fine grained testing of progress bar
Diffstat (limited to 'tests')
-rw-r--r-- | tests/progressbartest.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/progressbartest.c b/tests/progressbartest.c index 9459578..7ff4a91 100644 --- a/tests/progressbartest.c +++ b/tests/progressbartest.c @@ -4,6 +4,8 @@ #include <stdlib.h> #include <stdio.h> +#define NOF_TESTS 100000 + int main( void ) { cssh_progressbar_t p1; @@ -11,15 +13,15 @@ int main( void ) cssh_progressbar_pool_t pool; create_progressbar_pool( &pool, 2 ); - create_progressbar( &p1, 0, 100, 100, "[Running on host %s]:", "host1" ); - create_progressbar( &p2, 0, 100, 100, "[Running on host %s]:", "host2" ); + create_progressbar( &p1, 0, NOF_TESTS, 100, "[Running on host %s]:", "host1" ); + create_progressbar( &p2, 0, NOF_TESTS, 100, "[Running on host %s]:", "host2" ); append_progressbar_to_pool( &pool, &p1 ); append_progressbar_to_pool( &pool, &p2 ); - for( unsigned int i = 0; i < 100; i++ ) { + for( unsigned int i = 0; i < NOF_TESTS; i++ ) { set_value_of_progressbar( &p1, i ); - set_value_of_progressbar( &p2, 100 - i ); + set_value_of_progressbar( &p2, NOF_TESTS - i ); redraw_progressbars( &pool ); - cssh_msleep( 100 ); + //cssh_msleep( 10 ); } free_progressbar( &p1 ); |