mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-27 13:53:31 +01:00
Check roundtrip for each bit of {unsigned} int values
This commit is contained in:
parent
280109473f
commit
72e0dc0822
@ -44,6 +44,12 @@ test_int_voidstar_interop(void *arg)
|
||||
for (a = INT_MAX-1024; a < INT_MAX; a++) {
|
||||
assert_int_voidptr_roundtrip(a);
|
||||
}
|
||||
|
||||
a = 1;
|
||||
for (unsigned long i = 0; i < sizeof(int) * 8; i++) {
|
||||
assert_int_voidptr_roundtrip(a);
|
||||
a = (a << 1);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
@ -74,6 +80,12 @@ test_uint_voidstar_interop(void *arg)
|
||||
for (a = UINT_MAX-1024; a < UINT_MAX; a++) {
|
||||
assert_uint_voidptr_roundtrip(a);
|
||||
}
|
||||
|
||||
a = 1;
|
||||
for (unsigned long i = 0; i < sizeof(int) * 8; i++) {
|
||||
assert_uint_voidptr_roundtrip(a);
|
||||
a = (a << 1);
|
||||
}
|
||||
}
|
||||
|
||||
struct testcase_t slow_ptr_tests[] = {
|
||||
|
Loading…
Reference in New Issue
Block a user