comparison tests/run.d @ 142:1e48315c36fc

Made the test program work with >59 tests.
author Anders Johnsen <skabet@gmail.com>
date Sun, 20 Jul 2008 23:41:53 +0200
parents 570a4917413a
children 0ea5d2f3e96b
comparison
equal deleted inserted replaced
141:85d609399fdf 142:1e48315c36fc
70 void begin_test(int number, int total_tests, char[] name) 70 void begin_test(int number, int total_tests, char[] name)
71 { 71 {
72 char[60] progressbar = ' '; 72 char[60] progressbar = ' ';
73 int progress = number*progressbar.length/total_tests; 73 int progress = number*progressbar.length/total_tests;
74 progressbar[0 .. progress] = '='; 74 progressbar[0 .. progress] = '=';
75 progressbar[progress-1] = '>'; 75 if(progress)
76 progressbar[progress-1] = '>';
76 Stdout.format("\r{}% - [{}]", 1e2 * number / total_tests, progressbar); 77 Stdout.format("\r{}% - [{}]", 1e2 * number / total_tests, progressbar);
77 Stdout.flush(); 78 Stdout.flush();
78 //Thread.sleep(0.05); 79 //Thread.sleep(0.05);
79 } 80 }
80 81