Home | History | Annotate | Download | only in Support

Lines Matching refs:getLg

193 TEST(ScaledNumberHelpersTest, getLg) {
194 EXPECT_EQ(0, getLg(UINT32_C(1), 0));
195 EXPECT_EQ(1, getLg(UINT32_C(1), 1));
196 EXPECT_EQ(1, getLg(UINT32_C(2), 0));
197 EXPECT_EQ(3, getLg(UINT32_C(1), 3));
198 EXPECT_EQ(3, getLg(UINT32_C(7), 0));
199 EXPECT_EQ(3, getLg(UINT32_C(8), 0));
200 EXPECT_EQ(3, getLg(UINT32_C(9), 0));
201 EXPECT_EQ(3, getLg(UINT32_C(64), -3));
202 EXPECT_EQ(31, getLg((UINT32_MAX >> 1) + 2, 0));
203 EXPECT_EQ(32, getLg(UINT32_MAX, 0));
204 EXPECT_EQ(-1, getLg(UINT32_C(1), -1));
205 EXPECT_EQ(-1, getLg(UINT32_C(2), -2));
206 EXPECT_EQ(INT32_MIN, getLg(UINT32_C(0), -1));
207 EXPECT_EQ(INT32_MIN, getLg(UINT32_C(0), 0));
208 EXPECT_EQ(INT32_MIN, getLg(UINT32_C(0), 1));
210 EXPECT_EQ(0, getLg(UINT64_C(1), 0));
211 EXPECT_EQ(1, getLg(UINT64_C(1), 1));
212 EXPECT_EQ(1, getLg(UINT64_C(2), 0));
213 EXPECT_EQ(3, getLg(UINT64_C(1), 3));
214 EXPECT_EQ(3, getLg(UINT64_C(7), 0));
215 EXPECT_EQ(3, getLg(UINT64_C(8), 0));
216 EXPECT_EQ(3, getLg(UINT64_C(9), 0));
217 EXPECT_EQ(3, getLg(UINT64_C(64), -3));
218 EXPECT_EQ(63, getLg((UINT64_MAX >> 1) + 2, 0));
219 EXPECT_EQ(64, getLg(UINT64_MAX, 0));
220 EXPECT_EQ(-1, getLg(UINT64_C(1), -1));
221 EXPECT_EQ(-1, getLg(UINT64_C(2), -2));
222 EXPECT_EQ(INT32_MIN, getLg(UINT64_C(0), -1));
223 EXPECT_EQ(INT32_MIN, getLg(UINT64_C(0), 0));
224 EXPECT_EQ(INT32_MIN, getLg(UINT64_C(0), 1));