mirror of
https://github.com/MariaDB/server.git
synced 2025-01-22 23:04:20 +01:00
3b42b55489
git-svn-id: file:///svn/toku/tokudb@9507 c7de825b-a66e-492c-adef-691d508d4ae1
25 lines
760 B
C
25 lines
760 B
C
#include "test.h"
|
|
#include "key.h"
|
|
|
|
void
|
|
toku_test_keycompare (void) {
|
|
assert(toku_keycompare("a",1, "a",1)==0);
|
|
assert(toku_keycompare("aa",2, "a",1)>0);
|
|
assert(toku_keycompare("a",1, "aa",2)<0);
|
|
assert(toku_keycompare("b",1, "aa",2)>0);
|
|
assert(toku_keycompare("aa",2, "b",1)<0);
|
|
assert(toku_keycompare("aaaba",5, "aaaba",5)==0);
|
|
assert(toku_keycompare("aaaba",5, "aaaaa",5)>0);
|
|
assert(toku_keycompare("aaaaa",5, "aaaba",5)<0);
|
|
assert(toku_keycompare("aaaaa",3, "aaaba",3)==0);
|
|
assert(toku_keycompare("\000\000\000\a", 4, "\000\000\000\004", 4)>0);
|
|
}
|
|
|
|
int
|
|
test_main (int argc , const char *argv[]) {
|
|
default_parse_args(argc, argv);
|
|
|
|
toku_test_keycompare();
|
|
if (verbose) printf("test ok\n");
|
|
return 0;
|
|
}
|