summaryrefslogtreecommitdiff
path: root/unittest/mysys/bitmap-t.c
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2011-05-05 14:51:01 +0300
committerMichael Widenius <monty@askmonty.org>2011-05-05 14:51:01 +0300
commitd5caa00161453eb0cd61e3641d4e6783fb385319 (patch)
tree34c7e24c19fda340a460e8d5316ca054617c687d /unittest/mysys/bitmap-t.c
parenta67a5dd6f956bf6f62799eafa2c67d008ee15e24 (diff)
downloadmariadb-git-d5caa00161453eb0cd61e3641d4e6783fb385319.tar.gz
Improved 'make test-unit' time slightly
storage/maria/unittest/ma_test_loghandler-t.c: Don't sync during test storage/maria/unittest/ma_test_loghandler_multigroup-t.c: Don't sync during test storage/maria/unittest/ma_test_loghandler_multithread-t.c: Don't sync during test unittest/mysys/bitmap-t.c: Don't test all bit combinations (not needed) unittest/mysys/thr_template.c: Remove sleep as old bug should be fixed nowadays unittest/mysys/waiting_threads-t.c: Only run test with --big unittest/mytap/tap.c: Print total time at end of test. unittest/unit.pl: Use TAP::Harness instead of Test::Harness (recommended according to manual) Add times to tests.
Diffstat (limited to 'unittest/mysys/bitmap-t.c')
-rw-r--r--unittest/mysys/bitmap-t.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/unittest/mysys/bitmap-t.c b/unittest/mysys/bitmap-t.c
index 9fca9f8ef20..2065e10b53f 100644
--- a/unittest/mysys/bitmap-t.c
+++ b/unittest/mysys/bitmap-t.c
@@ -526,8 +526,14 @@ int main()
int const max_size = MAX_TESTED_BITMAP_SIZE;
MY_INIT("bitmap-t");
- plan(max_size - min_size);
- for (i= min_size; i < max_size; i++)
+ plan((max_size - min_size)/7+1);
+
+ /*
+ It's ok to do steps in 7, as i module 64 will go trough all values 1..63.
+ Any errors in the code should manifest as we are working with integers
+ of size 16, 32, or 64 bits...
+ */
+ for (i= min_size; i < max_size; i+=7)
ok(do_test(i) == 0, "bitmap size %d", i);
return exit_status();
}