123 } |
123 } |
124 |
124 |
125 TEST(Compare, UintPtr) { |
125 TEST(Compare, UintPtr) { |
126 test_compare<uintptr_t>(cx_cmp_uintptr); |
126 test_compare<uintptr_t>(cx_cmp_uintptr); |
127 } |
127 } |
|
128 |
|
129 TEST(Compare, Ptr) { |
|
130 int data[3]; |
|
131 EXPECT_EQ(0, cx_cmp_ptr(data, data)); |
|
132 EXPECT_EQ(-1, cx_cmp_ptr(&data[0], &data[1])); |
|
133 EXPECT_EQ(-1, cx_cmp_ptr(&data[1], &data[2])); |
|
134 EXPECT_EQ(1, cx_cmp_ptr(&data[2], &data[1])); |
|
135 EXPECT_EQ(1, cx_cmp_ptr(&data[1], data)); |
|
136 EXPECT_EQ(0, cx_cmp_ptr(&data[1], &data[1])); |
|
137 } |