Check if a function exists before testing it.

This commit is contained in:
Hans Leidekker 2003-12-15 20:18:50 +00:00 committed by Alexandre Julliard
parent 06464999f1
commit 73593d7eed
5 changed files with 58 additions and 34 deletions

View File

@ -295,7 +295,10 @@ START_TEST(env)
pRtlSetEnvironmentVariable = (void*)GetProcAddress(mod, "RtlSetEnvironmentVariable"); pRtlSetEnvironmentVariable = (void*)GetProcAddress(mod, "RtlSetEnvironmentVariable");
pRtlExpandEnvironmentStrings_U = (void*)GetProcAddress(mod, "RtlExpandEnvironmentStrings_U"); pRtlExpandEnvironmentStrings_U = (void*)GetProcAddress(mod, "RtlExpandEnvironmentStrings_U");
testQuery(); if (pRtlQueryEnvironmentVariable_U)
testSet(); testQuery();
testExpand(); if (pRtlSetEnvironmentVariable)
testSet();
if (pRtlExpandEnvironmentStrings_U)
testExpand();
} }

View File

@ -421,9 +421,10 @@ START_TEST(large_int)
{ {
InitFunctionPtrs(); InitFunctionPtrs();
test_RtlExtendedMagicDivide(); if (pRtlExtendedMagicDivide)
if (pRtlInt64ToUnicodeString != NULL) { test_RtlExtendedMagicDivide();
test_RtlInt64ToUnicodeString(); if (pRtlInt64ToUnicodeString)
} /* if */ test_RtlInt64ToUnicodeString();
test_RtlLargeIntegerToChar(); if (pRtlLargeIntegerToChar)
test_RtlLargeIntegerToChar();
} }

View File

@ -234,7 +234,10 @@ START_TEST(path)
pRtlIsDosDeviceName_U = (void *)GetProcAddress(mod,"RtlIsDosDeviceName_U"); pRtlIsDosDeviceName_U = (void *)GetProcAddress(mod,"RtlIsDosDeviceName_U");
pRtlOemStringToUnicodeString = (void *)GetProcAddress(mod,"RtlOemStringToUnicodeString"); pRtlOemStringToUnicodeString = (void *)GetProcAddress(mod,"RtlOemStringToUnicodeString");
pRtlIsNameLegalDOS8Dot3 = (void *)GetProcAddress(mod,"RtlIsNameLegalDOS8Dot3"); pRtlIsNameLegalDOS8Dot3 = (void *)GetProcAddress(mod,"RtlIsNameLegalDOS8Dot3");
test_RtlDetermineDosPathNameType(); if (pRtlDetermineDosPathNameType_U)
test_RtlIsDosDeviceName(); test_RtlDetermineDosPathNameType();
test_RtlIsNameLegalDOS8Dot3(); if (pRtlIsDosDeviceName_U)
test_RtlIsDosDeviceName();
if (pRtlIsNameLegalDOS8Dot3)
test_RtlIsNameLegalDOS8Dot3();
} }

View File

@ -827,18 +827,28 @@ START_TEST(rtl)
{ {
InitFunctionPtrs(); InitFunctionPtrs();
test_RtlCompareMemory(); if (pRtlCompareMemory)
test_RtlCompareMemoryUlong(); test_RtlCompareMemory();
test_RtlMoveMemory(); if (pRtlCompareMemoryUlong)
test_RtlFillMemory(); test_RtlCompareMemoryUlong();
test_RtlFillMemoryUlong(); if (pRtlMoveMemory)
test_RtlZeroMemory(); test_RtlMoveMemory();
if (pRtlUlonglongByteSwap) { if (pRtlFillMemory)
test_RtlUlonglongByteSwap(); test_RtlFillMemory();
} /* if */ if (pRtlFillMemoryUlong)
test_RtlUniform(); test_RtlFillMemoryUlong();
test_RtlRandom(); if (pRtlZeroMemory)
test_RtlAreAllAccessesGranted(); test_RtlZeroMemory();
test_RtlAreAnyAccessesGranted(); if (pRtlUlonglongByteSwap)
test_RtlComputeCrc32(); test_RtlUlonglongByteSwap();
if (pRtlUniform)
test_RtlUniform();
if (pRtlRandom)
test_RtlRandom();
if (pRtlAreAllAccessesGranted)
test_RtlAreAllAccessesGranted();
if (pRtlAreAnyAccessesGranted)
test_RtlAreAnyAccessesGranted();
if (pRtlComputeCrc32)
test_RtlComputeCrc32();
} }

View File

@ -1075,13 +1075,20 @@ START_TEST(string)
{ {
InitFunctionPtrs(); InitFunctionPtrs();
test_ulongtoa(); if (p_ultoa)
test_ulonglongtoa(); test_ulongtoa();
test_atoi64(); if (p_ui64toa)
test_ulonglongtoa();
test_ulongtow(); if (p_atoi64)
test_ulonglongtow(); test_atoi64();
test_wtoi(); if (p_ultow)
test_wtol(); test_ulongtow();
test_wtoi64(); if (p_ui64tow)
test_ulonglongtow();
if (p_wtoi)
test_wtoi();
if (p_wtol)
test_wtol();
if (p_wtoi64)
test_wtoi64();
} }