Initial import of libucore
This commit is contained in:
+27
@@ -0,0 +1,27 @@
|
||||
#include <stdio.h>
|
||||
#include "ucore_seq.h"
|
||||
|
||||
|
||||
void check_before(uint32_t a, uint32_t b)
|
||||
{
|
||||
printf("%lu before %lu = %d\n", a ,b, seq_before(a, b));
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
check_before(0, 1);
|
||||
check_before(1, 0);
|
||||
check_before(0, 0xffffffff);
|
||||
check_before(0, 0xffff);
|
||||
check_before(0, 0x1ffff);
|
||||
check_before(0xffff, 0xffffffff);
|
||||
check_before(0x7fffffffU - 1, 0xffffffff);
|
||||
check_before(0x7fffffffU + 1, 0xffffffff);
|
||||
check_before(0x7fffffffU + 1, 0x7fffffffU);
|
||||
check_before(0x7fffffffU - 1, 0x7fffffffU);
|
||||
check_before(0x7fffffffU, 0x7fffffffU - 1);
|
||||
check_before(0x7fffffffU, 0x7fffffffU + 1);
|
||||
|
||||
|
||||
return 1;
|
||||
}
|
||||
Reference in New Issue
Block a user