diff options
author | 2015-07-15 16:51:14 -0700 | |
---|---|---|
committer | 2015-07-15 16:51:14 -0700 | |
commit | 305e3bd6359f646746a0046f8fc44c82270c16ef (patch) | |
tree | 1ed54d2a9df5f9e2325cc7988521280376d71f13 /test | |
parent | 58ff670f03dda1116420a838a6d2ade4a15eb4c5 (diff) |
Added bitset macro ops
Diffstat (limited to 'test')
-rw-r--r-- | test/core/support/useful_test.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/core/support/useful_test.c b/test/core/support/useful_test.c index feaf436379..0804a81b7c 100644 --- a/test/core/support/useful_test.c +++ b/test/core/support/useful_test.c @@ -39,6 +39,7 @@ int main(int argc, char **argv) { int four[4]; int five[5]; + gpr_uint32 bitset = 0; grpc_test_init(argc, argv); GPR_ASSERT(GPR_MIN(1, 2) == 1); @@ -55,5 +56,11 @@ int main(int argc, char **argv) { GPR_ASSERT(GPR_ARRAY_SIZE(four) == 4); GPR_ASSERT(GPR_ARRAY_SIZE(five) == 5); + GPR_ASSERT(GPR_BITSET(bitset, 3) == 8); + GPR_ASSERT(GPR_BITGET(bitset, 3) == 1); + GPR_ASSERT(GPR_BITSET(bitset, 1) == 10); + GPR_ASSERT(GPR_BITCLEAR(bitset, 3) == 2); + GPR_ASSERT(GPR_BITGET(bitset, 3) == 0); + return 0; } |