static void test_RtlFindLeastSignificantBit(void) { int i; signed char cPos; ULONGLONG ulLong; if (!pRtlFindLeastSignificantBit) return; for (i = 0; i < 64; i++) { ulLong = (ULONGLONG)1 << i; cPos = pRtlFindLeastSignificantBit(ulLong); ok (cPos == i, "didn't find LSB 0x%s %d %d\n", wine_dbgstr_longlong(ulLong ), i, cPos); ulLong = ~((ULONGLONG)0) << i; cPos = pRtlFindLeastSignificantBit(ulLong); ok (cPos == i, "didn't find LSB 0x%s %d %d\n", wine_dbgstr_longlong(ulLong ), i, cPos); } cPos = pRtlFindLeastSignificantBit(0); ok (cPos == -1, "found bit when not set\n"); }
static void test_RtlFindLeastSignificantBit(void) { int i; CCHAR cPos; ULONGLONG ulLong; if (!pRtlFindLeastSignificantBit) return; for (i = 0; i < 64; i++) { ulLong = (ULONGLONG)1 << i; cPos = pRtlFindLeastSignificantBit(ulLong); ok (cPos == i, "didn't find LSB %llx %d %d\n", ulLong, i, cPos); ulLong = ~((ULONGLONG)0) << i; cPos = pRtlFindLeastSignificantBit(ulLong); ok (cPos == i, "didn't find LSB %llx %d %d\n", ulLong, i, cPos); } cPos = pRtlFindLeastSignificantBit(0); ok (cPos == -1, "found bit when not set\n"); }