I'll try to regularly submit patches to convert the tests to use ok("...\n") so that someday everythin is as it should be and we can remove the hack that adds a '\n' if there is none. I'll try to avoid sending patches when a etst is actively modified to minimize the risk of conflicts. The ntdll tests did not seem to be modified too much lately so here goes. Note: I'm sending a separate patch to fix the generation of the generated.c tests and then they can all be fixed in one go. Changelog: * dlls/ntdll/tests/env.c, dlls/ntdll/tests/error.c, dlls/ntdll/tests/large_int.c, dlls/ntdll/tests/path.c, dlls/ntdll/tests/rtl.c, dlls/ntdll/tests/rtlbitmap.c, dlls/ntdll/tests/rtlstr.c, dlls/ntdll/tests/string.c Modify ok("xxx") calls into ok("xxx\n") as is now expected. Index: dlls/ntdll/tests/env.c =================================================================== RCS file: /home/cvs/wine/dlls/ntdll/tests/env.c,v retrieving revision 1.4 diff -u -r1.4 env.c --- dlls/ntdll/tests/env.c 5 Sep 2003 23:08:34 -0000 1.4 +++ dlls/ntdll/tests/env.c 9 Sep 2003 19:04:11 -0000 @@ -106,22 +106,22 @@ pRtlMultiByteToUnicodeN( bn, sizeof(bn), NULL, test->var, strlen(test->var)+1 ); nts = pRtlQueryEnvironmentVariable_U(small_env, &name, &value); - ok( nts == test->status, "[%d]: Wrong status for '%s', expecting %lx got %lx", + ok( nts == test->status, "[%d]: Wrong status for '%s', expecting %lx got %lx\n", test - tests, test->var, test->status, nts ); if (nts == test->status) switch (nts) { case STATUS_SUCCESS: pRtlMultiByteToUnicodeN( bn, sizeof(bn), NULL, test->val, strlen(test->val)+1 ); - ok( value.Length == strlen(test->val) * sizeof(WCHAR), "Wrong length %d/%d for %s", + ok( value.Length == strlen(test->val) * sizeof(WCHAR), "Wrong length %d/%d for %s\n", value.Length, strlen(test->val) * sizeof(WCHAR), test->var ); ok((value.Length == strlen(test->val) * sizeof(WCHAR) && strncmpW(bv, bn, test->len) == 0) || strcmpW(bv, bn) == 0, - "Wrong result for %s/%d", test->var, test->len); - ok(bv[test->len] == '@', "Writing too far away in the buffer for %s/%d", test->var, test->len); + "Wrong result for %s/%d\n", test->var, test->len); + ok(bv[test->len] == '@', "Writing too far away in the buffer for %s/%d\n", test->var, test->len); break; case STATUS_BUFFER_TOO_SMALL: ok( value.Length == strlen(test->val) * sizeof(WCHAR), - "Wrong returned length %d/%d (too small buffer) for %s", + "Wrong returned length %d/%d (too small buffer) for %s\n", value.Length, strlen(test->val) * sizeof(WCHAR), test->var ); break; } @@ -147,7 +147,7 @@ pRtlMultiByteToUnicodeN( bval1, sizeof(bval1), NULL, val, strlen(val)+1 ); } nts = pRtlSetEnvironmentVariable(env, &uvar, val ? &uval : NULL); - ok(nts == ret, "Setting var %s=%s (%lx/%lx)", var, val, nts, ret); + ok(nts == ret, "Setting var %s=%s (%lx/%lx)\n", var, val, nts, ret); if (nts == STATUS_SUCCESS) { uval.Length = 0; @@ -157,13 +157,13 @@ switch (nts) { case STATUS_SUCCESS: - ok(strcmpW(bval1, bval2) == 0, "Cannot get value written to environment"); + ok(strcmpW(bval1, bval2) == 0, "Cannot get value written to environment\n"); break; case STATUS_VARIABLE_NOT_FOUND: - ok(val == NULL, "Couldn't find variable, but didn't delete it"); + ok(val == NULL, "Couldn't find variable, but didn't delete it\n"); break; default: - ok(0, "Wrong ret %lu for %s", nts, var); + ok(0, "Wrong ret %lu for %s\n", nts, var); break; } } @@ -175,7 +175,7 @@ char tmp[16]; int i; - ok(pRtlCreateEnvironment(FALSE, &env) == STATUS_SUCCESS, "Creating environment"); + ok(pRtlCreateEnvironment(FALSE, &env) == STATUS_SUCCESS, "Creating environment\n"); memmove(env, small_env, sizeof(small_env)); testSetHelper(&env, "cat", "dog", STATUS_SUCCESS); @@ -202,7 +202,7 @@ } testSetHelper(&env, "fOo", NULL, STATUS_SUCCESS); - ok(pRtlDestroyEnvironment(env) == STATUS_SUCCESS, "Destroying environment"); + ok(pRtlDestroyEnvironment(env) == STATUS_SUCCESS, "Destroying environment\n"); } static void testExpand(void) @@ -248,7 +248,7 @@ nts = pRtlExpandEnvironmentStrings_U(small_env, &us_src, &us_dst, &ul); ok(ul == strlen(test->dst) * sizeof(WCHAR) + sizeof(WCHAR), - "Wrong returned length for %s: %lu <> %u", + "Wrong returned length for %s: %lu <> %u\n", test->src, ul, strlen(test->dst) * sizeof(WCHAR) + sizeof(WCHAR)); us_dst.Length = 0; @@ -256,14 +256,14 @@ us_dst.Buffer = dst; nts = pRtlExpandEnvironmentStrings_U(small_env, &us_src, &us_dst, &ul); - ok(nts == STATUS_SUCCESS, "Call failed (%lu)", nts); + ok(nts == STATUS_SUCCESS, "Call failed (%lu)\n", nts); ok(ul == us_dst.Length + sizeof(WCHAR), - "Wrong returned length for %s: %lu <> %u", + "Wrong returned length for %s: %lu <> %u\n", test->src, ul, us_dst.Length + sizeof(WCHAR)); ok(ul == strlen(test->dst) * sizeof(WCHAR) + sizeof(WCHAR), - "Wrong returned length for %s: %lu <> %u", + "Wrong returned length for %s: %lu <> %u\n", test->src, ul, strlen(test->dst) * sizeof(WCHAR) + sizeof(WCHAR)); - ok(strcmpW(dst, rst) == 0, "Wrong result for %s: expecting %s", + ok(strcmpW(dst, rst) == 0, "Wrong result for %s: expecting %s\n", test->src, test->dst); us_dst.Length = 0; @@ -271,14 +271,14 @@ us_dst.Buffer = dst; dst[8] = '-'; nts = pRtlExpandEnvironmentStrings_U(small_env, &us_src, &us_dst, &ul); - ok(nts == STATUS_BUFFER_TOO_SMALL, "Call failed (%lu)", nts); + ok(nts == STATUS_BUFFER_TOO_SMALL, "Call failed (%lu)\n", nts); ok(ul == strlen(test->dst) * sizeof(WCHAR) + sizeof(WCHAR), - "Wrong returned length for %s (with buffer too small): %lu <> %u", + "Wrong returned length for %s (with buffer too small): %lu <> %u\n", test->src, ul, strlen(test->dst) * sizeof(WCHAR) + sizeof(WCHAR)); ok(strncmpW(dst, rst, 8) == 0, - "Wrong result for %s (with buffer too small): expecting %s", + "Wrong result for %s (with buffer too small): expecting %s\n", test->src, test->dst); - ok(dst[8] == '-', "Writing too far in buffer (got %c/%d)", dst[8], dst[8]); + ok(dst[8] == '-', "Writing too far in buffer (got %c/%d)\n", dst[8], dst[8]); } } Index: dlls/ntdll/tests/error.c =================================================================== RCS file: /home/cvs/wine/dlls/ntdll/tests/error.c,v retrieving revision 1.6 diff -u -r1.6 error.c --- dlls/ntdll/tests/error.c 4 Oct 2003 03:04:47 -0000 1.6 +++ dlls/ntdll/tests/error.c 17 Oct 2003 13:53:18 -0000 @@ -72,7 +72,7 @@ err = statustodoserror(win_nt); ok(err == win32, - "%s (%lx): got %ld, expected %ld", + "%s (%lx): got %ld, expected %ld\n", message, win_nt, err, win32); } @@ -83,7 +83,7 @@ err = statustodoserror(win_nt); ok(err == win32 || (!strict && err == ERROR_MR_MID_NOT_FOUND), - "%s (%lx): got %ld, expected %ld (or MID_NOT_FOUND)", + "%s (%lx): got %ld, expected %ld (or MID_NOT_FOUND)\n", message, win_nt, err, win32); } @@ -93,7 +93,7 @@ err = statustodoserror(win_nt); ok(err == win32_1 || (!strict && err == win32_2), - "%s (%lx): got %ld, expected %ld or %ld", + "%s (%lx): got %ld, expected %ld or %ld\n", message, win_nt, err, win32_1, win32_2); } @@ -104,7 +104,7 @@ err = statustodoserror(win_nt); ok(err == win32_1 || (!strict && (err == win32_2 || err == ERROR_MR_MID_NOT_FOUND)), - "%s (%lx): got %ld, expected %ld or %ld", + "%s (%lx): got %ld, expected %ld or %ld\n", message, win_nt, err, win32_1, win32_2); } Index: dlls/ntdll/tests/generated.c =================================================================== RCS file: /home/cvs/wine/dlls/ntdll/tests/generated.c,v retrieving revision 1.7 diff -u -r1.7 generated.c --- dlls/ntdll/tests/generated.c 5 Sep 2003 23:08:34 -0000 1.7 +++ dlls/ntdll/tests/generated.c 9 Sep 2003 19:04:10 -0000 @@ -72,20 +72,20 @@ #ifdef _TYPE_ALIGNMENT #define TEST__TYPE_ALIGNMENT(type, align) \ - ok(_TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")", _TYPE_ALIGNMENT(type)) + ok(_TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(\n" #type ") == %d (expected " #align ")", _TYPE_ALIGNMENT(type)) #else # define TEST__TYPE_ALIGNMENT(type, align) do { } while (0) #endif #ifdef TYPE_ALIGNMENT #define TEST_TYPE_ALIGNMENT(type, align) \ - ok(TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")", TYPE_ALIGNMENT(type)) + ok(TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(\n" #type ") == %d (expected " #align ")", TYPE_ALIGNMENT(type)) #else # define TEST_TYPE_ALIGNMENT(type, align) do { } while (0) #endif #define TEST_TYPE_SIZE(type, size) \ - ok(sizeof(type) == size, "sizeof(" #type ") == %d (expected " #size ")", sizeof(type)) + ok(sizeof(type) == size, "sizeof(\n" #type ") == %d (expected " #size ")", sizeof(type)) /*********************************************************************** * Test macros @@ -105,10 +105,10 @@ TEST_TYPE_SIZE(*(type)0, size) #define TEST_TYPE_SIGNED(type) \ - ok((type) -1 < 0, "(" #type ") -1 < 0"); + ok((type) -1 < 0, "(\n" #type ") -1 < 0"); #define TEST_TYPE_UNSIGNED(type) \ - ok((type) -1 > 0, "(" #type ") -1 > 0"); + ok((type) -1 > 0, "(\n" #type ") -1 > 0"); static void test_pack_DWORD32(void) { Index: dlls/ntdll/tests/large_int.c =================================================================== RCS file: /home/cvs/wine/dlls/ntdll/tests/large_int.c,v retrieving revision 1.4 diff -u -r1.4 large_int.c --- dlls/ntdll/tests/large_int.c 4 Oct 2003 03:04:47 -0000 1.4 +++ dlls/ntdll/tests/large_int.c 17 Oct 2003 13:53:19 -0000 @@ -45,7 +45,7 @@ static void InitFunctionPtrs() { hntdll = LoadLibraryA("ntdll.dll"); - ok(hntdll != 0, "LoadLibrary failed"); + ok(hntdll != 0, "LoadLibrary failed\n"); if (hntdll) { pRtlExtendedMagicDivide = (void *)GetProcAddress(hntdll, "RtlExtendedMagicDivide"); pRtlFreeAnsiString = (void *)GetProcAddress(hntdll, "RtlFreeAnsiString"); @@ -120,7 +120,7 @@ for (i = 0; i < NB_MAGIC_DIVIDE; i++) { result = pRtlExtendedMagicDivide(magic_divide[i].a, magic_divide[i].b, magic_divide[i].shift); ok(result == magic_divide[i].result, - "call failed: RtlExtendedMagicDivide(%lld, %llu, %d) has result %llx, expected %llx", + "call failed: RtlExtendedMagicDivide(%lld, %llu, %d) has result %llx, expected %llx\n", magic_divide[i].a, magic_divide[i].b, magic_divide[i].shift, result, magic_divide[i].result); } } @@ -329,22 +329,22 @@ } /* if */ } else { ok(result == largeint2str->result, - "(test %d): RtlInt64ToUnicodeString(%llu, %d, [out]) has result %lx, expected: %lx", + "(test %d): RtlInt64ToUnicodeString(%llu, %d, [out]) has result %lx, expected: %lx\n", test_num, largeint2str->value, largeint2str->base, result, largeint2str->result); if (result == STATUS_SUCCESS) { ok(unicode_string.Buffer[unicode_string.Length/sizeof(WCHAR)] == '\0', - "(test %d): RtlInt64ToUnicodeString(%llu, %d, [out]) string \"%s\" is not NULL terminated", + "(test %d): RtlInt64ToUnicodeString(%llu, %d, [out]) string \"%s\" is not NULL terminated\n", test_num, largeint2str->value, largeint2str->base, ansi_str.Buffer); } /* if */ } /* if */ ok(memcmp(unicode_string.Buffer, expected_unicode_string.Buffer, LARGE_STRI_BUFFER_LENGTH * sizeof(WCHAR)) == 0, - "(test %d): RtlInt64ToUnicodeString(%llu, %d, [out]) assigns string \"%s\", expected: \"%s\"", + "(test %d): RtlInt64ToUnicodeString(%llu, %d, [out]) assigns string \"%s\", expected: \"%s\"\n", test_num, largeint2str->value, largeint2str->base, ansi_str.Buffer, expected_ansi_str.Buffer); ok(unicode_string.Length == expected_unicode_string.Length, - "(test %d): RtlInt64ToUnicodeString(%llu, %d, [out]) string has Length %d, expected: %d", + "(test %d): RtlInt64ToUnicodeString(%llu, %d, [out]) string has Length %d, expected: %d\n", test_num, largeint2str->value, largeint2str->base, unicode_string.Length, expected_unicode_string.Length); ok(unicode_string.MaximumLength == expected_unicode_string.MaximumLength, - "(test %d): RtlInt64ToUnicodeString(%llu, %d, [out]) string has MaximumLength %d, expected: %d", + "(test %d): RtlInt64ToUnicodeString(%llu, %d, [out]) string has MaximumLength %d, expected: %d\n", test_num, largeint2str->value, largeint2str->base, unicode_string.MaximumLength, expected_unicode_string.MaximumLength); pRtlFreeAnsiString(&expected_ansi_str); pRtlFreeAnsiString(&ansi_str); @@ -376,10 +376,10 @@ result = pRtlLargeIntegerToChar(&value, largeint2str->base, largeint2str->MaximumLength, dest_str); } /* if */ ok(result == largeint2str->result, - "(test %d): RtlLargeIntegerToChar(%llu, %d, %d, [out]) has result %lx, expected: %lx", + "(test %d): RtlLargeIntegerToChar(%llu, %d, %d, [out]) has result %lx, expected: %lx\n", test_num, largeint2str->value, largeint2str->base, largeint2str->MaximumLength, result, largeint2str->result); ok(memcmp(dest_str, largeint2str->Buffer, LARGE_STRI_BUFFER_LENGTH) == 0, - "(test %d): RtlLargeIntegerToChar(%llu, %d, %d, [out]) assigns string \"%s\", expected: \"%s\"", + "(test %d): RtlLargeIntegerToChar(%llu, %d, %d, [out]) assigns string \"%s\", expected: \"%s\"\n", test_num, largeint2str->value, largeint2str->base, largeint2str->MaximumLength, dest_str, largeint2str->Buffer); } @@ -397,22 +397,22 @@ value = largeint2str[0].value; result = pRtlLargeIntegerToChar(&value, 20, largeint2str[0].MaximumLength, NULL); ok(result == STATUS_INVALID_PARAMETER, - "(test a): RtlLargeIntegerToChar(%llu, %d, %d, NULL) has result %lx, expected: %x", + "(test a): RtlLargeIntegerToChar(%llu, %d, %d, NULL) has result %lx, expected: %x\n", largeint2str[0].value, 20, largeint2str[0].MaximumLength, result, STATUS_INVALID_PARAMETER); result = pRtlLargeIntegerToChar(&value, 20, 0, NULL); ok(result == STATUS_INVALID_PARAMETER, - "(test b): RtlLargeIntegerToChar(%llu, %d, %d, NULL) has result %lx, expected: %x", + "(test b): RtlLargeIntegerToChar(%llu, %d, %d, NULL) has result %lx, expected: %x\n", largeint2str[0].value, 20, largeint2str[0].MaximumLength, result, STATUS_INVALID_PARAMETER); result = pRtlLargeIntegerToChar(&value, largeint2str[0].base, 0, NULL); ok(result == STATUS_BUFFER_OVERFLOW, - "(test c): RtlLargeIntegerToChar(%llu, %d, %d, NULL) has result %lx, expected: %x", + "(test c): RtlLargeIntegerToChar(%llu, %d, %d, NULL) has result %lx, expected: %x\n", largeint2str[0].value, largeint2str[0].base, 0, result, STATUS_BUFFER_OVERFLOW); result = pRtlLargeIntegerToChar(&value, largeint2str[0].base, largeint2str[0].MaximumLength, NULL); ok(result == STATUS_ACCESS_VIOLATION, - "(test d): RtlLargeIntegerToChar(%llu, %d, %d, NULL) has result %lx, expected: %x", + "(test d): RtlLargeIntegerToChar(%llu, %d, %d, NULL) has result %lx, expected: %x\n", largeint2str[0].value, largeint2str[0].base, largeint2str[0].MaximumLength, result, STATUS_ACCESS_VIOLATION); } Index: dlls/ntdll/tests/path.c =================================================================== RCS file: /home/cvs/wine/dlls/ntdll/tests/path.c,v retrieving revision 1.4 diff -u -r1.4 path.c --- dlls/ntdll/tests/path.c 6 Oct 2003 21:03:32 -0000 1.4 +++ dlls/ntdll/tests/path.c 17 Oct 2003 13:53:19 -0000 @@ -84,7 +84,7 @@ { pRtlMultiByteToUnicodeN( buffer, sizeof(buffer), NULL, test->path, strlen(test->path)+1 ); ret = pRtlDetermineDosPathNameType_U( buffer ); - ok( ret == test->ret, "Wrong result %d/%d for %s", ret, test->ret, test->path ); + ok( ret == test->ret, "Wrong result %d/%d for %s\n", ret, test->ret, test->path ); } } @@ -148,7 +148,7 @@ pRtlMultiByteToUnicodeN( buffer, sizeof(buffer), NULL, test->path, strlen(test->path)+1 ); ret = pRtlIsDosDeviceName_U( buffer ); ok( ret == MAKELONG( test->len, test->pos ), - "Wrong result (%d,%d)/(%d,%d) for %s", + "Wrong result (%d,%d)/(%d,%d) for %s\n", HIWORD(ret), LOWORD(ret), test->pos, test->len, test->path ); } } @@ -209,18 +209,18 @@ oem_ret.Length = oem_ret.MaximumLength = sizeof(buff2); oem_ret.Buffer = buff2; ret = pRtlIsNameLegalDOS8Dot3( &ustr, &oem_ret, &spaces ); - ok( ret == test->result, "Wrong result %d/%d for '%s'", ret, test->result, test->path ); - ok( spaces == test->spaces, "Wrong spaces value %d/%d for '%s'", spaces, test->spaces, test->path ); + ok( ret == test->result, "Wrong result %d/%d for '%s'\n", ret, test->result, test->path ); + ok( spaces == test->spaces, "Wrong spaces value %d/%d for '%s'\n", spaces, test->spaces, test->path ); if (strlen(test->path) <= 12) { char str[13]; int i; strcpy( str, test->path ); for (i = 0; str[i]; i++) str[i] = toupper(str[i]); - ok( oem_ret.Length == strlen(test->path), "Wrong length %d/%d for '%s'", + ok( oem_ret.Length == strlen(test->path), "Wrong length %d/%d for '%s'\n", oem_ret.Length, strlen(test->path), test->path ); ok( !memcmp( oem_ret.Buffer, str, oem_ret.Length ), - "Wrong string '%.*s'/'%s'", oem_ret.Length, oem_ret.Buffer, str ); + "Wrong string '%.*s'/'%s'\n", oem_ret.Length, oem_ret.Buffer, str ); } } } Index: dlls/ntdll/tests/rtl.c =================================================================== RCS file: /home/cvs/wine/dlls/ntdll/tests/rtl.c,v retrieving revision 1.5 diff -u -r1.5 rtl.c --- dlls/ntdll/tests/rtl.c 5 Sep 2003 23:08:34 -0000 1.5 +++ dlls/ntdll/tests/rtl.c 9 Sep 2003 19:04:11 -0000 @@ -58,7 +58,7 @@ static void InitFunctionPtrs(void) { hntdll = LoadLibraryA("ntdll.dll"); - ok(hntdll != 0, "LoadLibrary failed"); + ok(hntdll != 0, "LoadLibrary failed\n"); if (hntdll) { pRtlCompareMemory = (void *)GetProcAddress(hntdll, "RtlCompareMemory"); pRtlCompareMemoryUlong = (void *)GetProcAddress(hntdll, "RtlCompareMemoryUlong"); @@ -241,7 +241,7 @@ result = pRtlUlonglongByteSwap( ((ULONGLONG)0x76543210 << 32) | 0x87654321 ); ok( (((ULONGLONG)0x21436587 << 32) | 0x10325476) == result, - "RtlUlonglongByteSwap(0x7654321087654321) returns 0x%llx, expected 0x2143658710325476", + "RtlUlonglongByteSwap(0x7654321087654321) returns 0x%llx, expected 0x2143658710325476\n", result); } @@ -276,7 +276,7 @@ expected = 0x7fffffc3; result = pRtlUniform(&seed); ok(result == expected, - "RtlUniform(&seed (seed == 0)) returns %lx, expected %lx", + "RtlUniform(&seed (seed == 0)) returns %lx, expected %lx\n", result, expected); /* * The algorithm is now: @@ -297,7 +297,7 @@ expected = seed * 0xffffffed + 0x7fffffc3 + 1; result = pRtlUniform(&seed); ok(result == expected, - "RtlUniform(&seed (seed == 1)) returns %lx, expected %lx", + "RtlUniform(&seed (seed == 1)) returns %lx, expected %lx\n", result, expected); /* * For seed = 2 the const_2 is 0x7fffffc3: @@ -306,7 +306,7 @@ expected = seed * 0xffffffed + 0x7fffffc3; result = pRtlUniform(&seed); ok(result == expected, - "RtlUniform(&seed (seed == 2)) returns %lx, expected %lx", + "RtlUniform(&seed (seed == 2)) returns %lx, expected %lx\n", result, expected); /* * More tests show that if seed is odd the result must be incremented by 1: @@ -315,21 +315,21 @@ expected = seed * 0xffffffed + 0x7fffffc3 + (seed & 1); result = pRtlUniform(&seed); ok(result == expected, - "RtlUniform(&seed (seed == 2)) returns %lx, expected %lx", + "RtlUniform(&seed (seed == 2)) returns %lx, expected %lx\n", result, expected); seed = 0x6bca1aa; expected = seed * 0xffffffed + 0x7fffffc3; result = pRtlUniform(&seed); ok(result == expected, - "RtlUniform(&seed (seed == 0x6bca1aa)) returns %lx, expected %lx", + "RtlUniform(&seed (seed == 0x6bca1aa)) returns %lx, expected %lx\n", result, expected); seed = 0x6bca1ab; expected = seed * 0xffffffed + 0x7fffffc3 + 1; result = pRtlUniform(&seed); ok(result == expected, - "RtlUniform(&seed (seed == 0x6bca1ab)) returns %lx, expected %lx", + "RtlUniform(&seed (seed == 0x6bca1ab)) returns %lx, expected %lx\n", result, expected); /* * When seed is 0x6bca1ac there is an exception: @@ -338,7 +338,7 @@ expected = seed * 0xffffffed + 0x7fffffc3 + 2; result = pRtlUniform(&seed); ok(result == expected, - "RtlUniform(&seed (seed == 0x6bca1ac)) returns %lx, expected %lx", + "RtlUniform(&seed (seed == 0x6bca1ac)) returns %lx, expected %lx\n", result, expected); /* * Note that up to here const_3 is not used @@ -350,14 +350,14 @@ expected = (seed * 0xffffffed + 0x7fffffc3) & MAXLONG; result = pRtlUniform(&seed); ok(result == expected, - "RtlUniform(&seed (seed == 0x6bca1ad)) returns %lx, expected %lx", + "RtlUniform(&seed (seed == 0x6bca1ad)) returns %lx, expected %lx\n", result, expected); seed = 0x6bca1ae; expected = (seed * 0xffffffed + 0x7fffffc3 + 1) & MAXLONG; result = pRtlUniform(&seed); ok(result == expected, - "RtlUniform(&seed (seed == 0x6bca1ae)) returns %lx, expected %lx", + "RtlUniform(&seed (seed == 0x6bca1ae)) returns %lx, expected %lx\n", result, expected); /* * There are several ranges where for odd or even seed the result must be @@ -465,10 +465,10 @@ seed_bak = seed; result = pRtlUniform(&seed); ok(result == expected, - "test: %llu RtlUniform(&seed (seed == %lx)) returns %lx, expected %lx", + "test: %llu RtlUniform(&seed (seed == %lx)) returns %lx, expected %lx\n", num, seed_bak, result, expected); ok(seed == expected, - "test: %llu RtlUniform(&seed (seed == %lx)) sets seed to %lx, expected %lx", + "test: %llu RtlUniform(&seed (seed == %lx)) sets seed to %lx, expected %lx\n", num, seed_bak, seed, expected); } /* for */ /* @@ -512,10 +512,10 @@ seed_bak = seed; result = pRtlUniform(&seed); ok(result == expected, - "test: %llu RtlUniform(&seed (seed == %lx)) returns %lx, expected %lx", + "test: %llu RtlUniform(&seed (seed == %lx)) returns %lx, expected %lx\n", num, seed_bak, result, expected); ok(seed == expected, - "test: %llu RtlUniform(&seed (seed == %lx)) sets seed to %lx, expected %lx", + "test: %llu RtlUniform(&seed (seed == %lx)) sets seed to %lx, expected %lx\n", num, seed_bak, seed, expected); } /* for */ /* @@ -592,10 +592,10 @@ seed_expected =0x44b; result = pRtlRandom(&seed); ok(result == result_expected, - "pRtlRandom(&seed (seed == 0)) returns %lx, expected %lx", + "pRtlRandom(&seed (seed == 0)) returns %lx, expected %lx\n", result, result_expected); ok(seed == seed_expected, - "pRtlRandom(&seed (seed == 0)) sets seed to %lx, expected %lx", + "pRtlRandom(&seed (seed == 0)) sets seed to %lx, expected %lx\n", seed, seed_expected); /* * Seed is not equal to result as with RtlUniform. To see more we @@ -606,10 +606,10 @@ seed_expected =0x44b; result = pRtlRandom(&seed); ok(result == result_expected, - "RtlRandom(&seed (seed == 0)) returns %lx, expected %lx", + "RtlRandom(&seed (seed == 0)) returns %lx, expected %lx\n", result, result_expected); ok(seed == seed_expected, - "RtlRandom(&seed (seed == 0)) sets seed to %lx, expected %lx", + "RtlRandom(&seed (seed == 0)) sets seed to %lx, expected %lx\n", seed, seed_expected); /* * Seed is set to the same value as before but the result is different. @@ -620,10 +620,10 @@ seed_expected =0x44b; result = pRtlRandom(&seed); ok(result == result_expected, - "RtlRandom(&seed (seed == 0)) returns %lx, expected %lx", + "RtlRandom(&seed (seed == 0)) returns %lx, expected %lx\n", result, result_expected); ok(seed == seed_expected, - "RtlRandom(&seed (seed == 0)) sets seed to %lx, expected %lx", + "RtlRandom(&seed (seed == 0)) sets seed to %lx, expected %lx\n", seed, seed_expected); /* * Seed is aggain set to the same value as before. This time we also @@ -668,10 +668,10 @@ seed_expected =0x5a1; result = pRtlRandom(&seed); ok(result == result_expected, - "RtlRandom(&seed (seed == 1)) returns %lx, expected %lx", + "RtlRandom(&seed (seed == 1)) returns %lx, expected %lx\n", result, result_expected); ok(seed == seed_expected, - "RtlRandom(&seed (seed == 1)) sets seed to %lx, expected %lx", + "RtlRandom(&seed (seed == 1)) sets seed to %lx, expected %lx\n", seed, seed_expected); /* * If there is just one saved_value the result now would be @@ -729,10 +729,10 @@ } /* if */ result = pRtlRandom(&seed); ok(result == result_expected, - "test: %llu RtlUniform(&seed (seed == %lx)) returns %lx, expected %lx", + "test: %llu RtlUniform(&seed (seed == %lx)) returns %lx, expected %lx\n", num, seed_bak, result, result_expected); ok(seed == seed_expected, - "test: %llu RtlUniform(&seed (seed == %lx)) sets seed to %lx, expected %lx", + "test: %llu RtlUniform(&seed (seed == %lx)) sets seed to %lx, expected %lx\n", num, seed_bak, seed, seed_expected); } /* for */ } @@ -768,7 +768,7 @@ result = pRtlAreAllAccessesGranted(all_accesses[test_num].GrantedAccess, all_accesses[test_num].DesiredAccess); ok(all_accesses[test_num].result == result, - "(test %d): RtlAreAllAccessesGranted(%08lx, %08lx) returns %d, expected %d", + "(test %d): RtlAreAllAccessesGranted(%08lx, %08lx) returns %d, expected %d\n", test_num, all_accesses[test_num].GrantedAccess, all_accesses[test_num].DesiredAccess, result, all_accesses[test_num].result); @@ -805,7 +805,7 @@ result = pRtlAreAnyAccessesGranted(any_accesses[test_num].GrantedAccess, any_accesses[test_num].DesiredAccess); ok(any_accesses[test_num].result == result, - "(test %d): RtlAreAnyAccessesGranted(%08lx, %08lx) returns %d, expected %d", + "(test %d): RtlAreAnyAccessesGranted(%08lx, %08lx) returns %d, expected %d\n", test_num, any_accesses[test_num].GrantedAccess, any_accesses[test_num].DesiredAccess, result, any_accesses[test_num].result); Index: dlls/ntdll/tests/rtlbitmap.c =================================================================== RCS file: /home/cvs/wine/dlls/ntdll/tests/rtlbitmap.c,v retrieving revision 1.5 diff -u -r1.5 rtlbitmap.c --- dlls/ntdll/tests/rtlbitmap.c 5 Sep 2003 23:08:34 -0000 1.5 +++ dlls/ntdll/tests/rtlbitmap.c 9 Sep 2003 19:04:10 -0000 @@ -56,7 +56,7 @@ static void InitFunctionPtrs() { hntdll = LoadLibraryA("ntdll.dll"); - ok(hntdll != 0, "LoadLibrary failed"); + ok(hntdll != 0, "LoadLibrary failed\n"); if (hntdll) { pRtlInitializeBitMap = (void *)GetProcAddress(hntdll, "RtlInitializeBitMap"); @@ -89,15 +89,15 @@ buff[79] = 77; pRtlInitializeBitMap(&bm, buff, 800); - ok(bm.SizeOfBitMap == 800, "size uninitialised"); - ok(bm.BitMapBuffer == buff,"buffer uninitialised"); - ok(buff[0] == 77 && buff[79] == 77, "wrote to buffer"); + ok(bm.SizeOfBitMap == 800, "size uninitialised\n"); + ok(bm.BitMapBuffer == buff,"buffer uninitialised\n"); + ok(buff[0] == 77 && buff[79] == 77, "wrote to buffer\n"); /* Test inlined version */ RtlInitializeBitMap(&bm, buff, 800); - ok(bm.SizeOfBitMap == 800, "size uninitialised"); - ok(bm.BitMapBuffer == buff,"buffer uninitialised"); - ok(buff[0] == 77 && buff[79] == 77, "wrote to buffer"); + ok(bm.SizeOfBitMap == 800, "size uninitialised\n"); + ok(bm.BitMapBuffer == buff,"buffer uninitialised\n"); + ok(buff[0] == 77 && buff[79] == 77, "wrote to buffer\n"); } static void test_RtlSetAllBits(void) @@ -110,15 +110,15 @@ pRtlSetAllBits(&bm); ok(buff[0] == 0xff && buff[1] == 0xff && buff[2] == 0xff && - buff[3] == 0xff, "didnt round up size"); - ok(buff[4] == 0, "set more than rounded size"); + buff[3] == 0xff, "didnt round up size\n"); + ok(buff[4] == 0, "set more than rounded size\n"); /* Test inlined version */ memset(buff, 0 , sizeof(buff)); RtlSetAllBits(&bm); ok(buff[0] == 0xff && buff[1] == 0xff && buff[2] == 0xff && - buff[3] == 0xff, "didnt round up size"); - ok(buff[4] == 0, "set more than rounded size"); + buff[3] == 0xff, "didnt round up size\n"); + ok(buff[4] == 0, "set more than rounded size\n"); } static void test_RtlClearAllBits() @@ -130,14 +130,14 @@ pRtlInitializeBitMap(&bm, buff, 1); pRtlClearAllBits(&bm); - ok(!buff[0] && !buff[1] && !buff[2] && !buff[3], "didnt round up size"); - ok(buff[4] == 0xff, "cleared more than rounded size"); + ok(!buff[0] && !buff[1] && !buff[2] && !buff[3], "didnt round up size\n"); + ok(buff[4] == 0xff, "cleared more than rounded size\n"); /* Test inlined version */ memset(buff, 0xff , sizeof(buff)); RtlClearAllBits(&bm); - ok(!buff[0] && !buff[1] && !buff[2] && !buff[3] , "didnt round up size"); - ok(buff[4] == 0xff, "cleared more than rounded size"); + ok(!buff[0] && !buff[1] && !buff[2] && !buff[3] , "didnt round up size\n"); + ok(buff[4] == 0xff, "cleared more than rounded size\n"); } static void test_RtlSetBits() @@ -149,23 +149,23 @@ pRtlInitializeBitMap(&bm, buff, sizeof(buff)*8); pRtlSetBits(&bm, 0, 1); - ok(buff[0] == 1, "didnt set 1st bit"); + ok(buff[0] == 1, "didnt set 1st bit\n"); buff[0] = 0; pRtlSetBits(&bm, 7, 2); - ok(buff[0] == 0x80 && buff[1] == 1, "didnt span w/len < 8"); + ok(buff[0] == 0x80 && buff[1] == 1, "didnt span w/len < 8\n"); buff[0] = buff[1] = 0; pRtlSetBits(&bm, 7, 10); - ok(buff[0] == 0x80 && buff[1] == 0xff && buff[2] == 1, "didnt span w/len > 8"); + ok(buff[0] == 0x80 && buff[1] == 0xff && buff[2] == 1, "didnt span w/len > 8\n"); buff[0] = buff[1] = buff[2] = 0; pRtlSetBits(&bm, 0, 8); /* 1st byte */ - ok(buff[0] == 0xff, "didnt set all bits"); - ok(!buff[1], "set too many bits"); + ok(buff[0] == 0xff, "didnt set all bits\n"); + ok(!buff[1], "set too many bits\n"); pRtlSetBits(&bm, sizeof(buff)*8-1, 1); /* last bit */ - ok(buff[sizeof(buff)-1] == 0x80, "didnt set last bit"); + ok(buff[sizeof(buff)-1] == 0x80, "didnt set last bit\n"); } static void test_RtlClearBits() @@ -177,23 +177,23 @@ pRtlInitializeBitMap(&bm, buff, sizeof(buff)*8); pRtlClearBits(&bm, 0, 1); - ok(buff[0] == 0xfe, "didnt clear 1st bit"); + ok(buff[0] == 0xfe, "didnt clear 1st bit\n"); buff[0] = 0xff; pRtlClearBits(&bm, 7, 2); - ok(buff[0] == 0x7f && buff[1] == 0xfe, "didnt span w/len < 8"); + ok(buff[0] == 0x7f && buff[1] == 0xfe, "didnt span w/len < 8\n"); buff[0] = buff[1] = 0xff; pRtlClearBits(&bm, 7, 10); - ok(buff[0] == 0x7f && buff[1] == 0 && buff[2] == 0xfe, "didnt span w/len > 8"); + ok(buff[0] == 0x7f && buff[1] == 0 && buff[2] == 0xfe, "didnt span w/len > 8\n"); buff[0] = buff[1] = buff[2] = 0xff; pRtlClearBits(&bm, 0, 8); /* 1st byte */ - ok(!buff[0], "didnt clear all bits"); - ok(buff[1] == 0xff, "cleared too many bits"); + ok(!buff[0], "didnt clear all bits\n"); + ok(buff[1] == 0xff, "cleared too many bits\n"); pRtlClearBits(&bm, sizeof(buff)*8-1, 1); - ok(buff[sizeof(buff)-1] == 0x7f, "didnt set last bit"); + ok(buff[sizeof(buff)-1] == 0x7f, "didnt set last bit\n"); } static void test_RtlCheckBit() @@ -207,17 +207,17 @@ pRtlSetBits(&bm, sizeof(buff)*8-1, 1); bRet = RtlCheckBit(&bm, 0); - ok (bRet, "didnt find set bit"); + ok (bRet, "didnt find set bit\n"); bRet = RtlCheckBit(&bm, 7); - ok (bRet, "didnt find set bit"); + ok (bRet, "didnt find set bit\n"); bRet = RtlCheckBit(&bm, 8); - ok (bRet, "didnt find set bit"); + ok (bRet, "didnt find set bit\n"); bRet = RtlCheckBit(&bm, sizeof(buff)*8-1); - ok (bRet, "didnt find set bit"); + ok (bRet, "didnt find set bit\n"); bRet = RtlCheckBit(&bm, 1); - ok (!bRet, "found non set bit"); + ok (!bRet, "found non set bit\n"); bRet = RtlCheckBit(&bm, sizeof(buff)*8-2); - ok (!bRet, "found non set bit"); + ok (!bRet, "found non set bit\n"); } static void test_RtlAreBitsSet() @@ -231,38 +231,38 @@ pRtlInitializeBitMap(&bm, buff, sizeof(buff)*8); bRet = pRtlAreBitsSet(&bm, 0, 1); - ok (!bRet, "found set bits after init"); + ok (!bRet, "found set bits after init\n"); pRtlSetBits(&bm, 0, 1); bRet = pRtlAreBitsSet(&bm, 0, 1); - ok (bRet, "didnt find set bits"); + ok (bRet, "didnt find set bits\n"); buff[0] = 0; pRtlSetBits(&bm, 7, 2); bRet = pRtlAreBitsSet(&bm, 7, 2); - ok(bRet, "didnt find w/len < 8"); + ok(bRet, "didnt find w/len < 8\n"); bRet = pRtlAreBitsSet(&bm, 6, 3); - ok(!bRet, "found non set bit"); + ok(!bRet, "found non set bit\n"); bRet = pRtlAreBitsSet(&bm, 7, 3); - ok(!bRet, "found non set bit"); + ok(!bRet, "found non set bit\n"); buff[0] = buff[1] = 0; pRtlSetBits(&bm, 7, 10); bRet = pRtlAreBitsSet(&bm, 7, 10); - ok(bRet, "didnt find w/len < 8"); + ok(bRet, "didnt find w/len < 8\n"); bRet = pRtlAreBitsSet(&bm, 6, 11); - ok(!bRet, "found non set bit"); + ok(!bRet, "found non set bit\n"); bRet = pRtlAreBitsSet(&bm, 7, 11); - ok(!bRet, "found non set bit"); + ok(!bRet, "found non set bit\n"); buff[0] = buff[1] = buff[2] = 0; pRtlSetBits(&bm, 0, 8); /* 1st byte */ bRet = pRtlAreBitsSet(&bm, 0, 8); - ok(bRet, "didn't find whole byte"); + ok(bRet, "didn't find whole byte\n"); pRtlSetBits(&bm, sizeof(buff)*8-1, 1); bRet = pRtlAreBitsSet(&bm, sizeof(buff)*8-1, 1); - ok(bRet, "didn't find last bit"); + ok(bRet, "didn't find last bit\n"); } static void test_RtlAreBitsClear() @@ -276,38 +276,38 @@ pRtlInitializeBitMap(&bm, buff, sizeof(buff)*8); bRet = pRtlAreBitsClear(&bm, 0, 1); - ok (!bRet, "found clear bits after init"); + ok (!bRet, "found clear bits after init\n"); pRtlClearBits(&bm, 0, 1); bRet = pRtlAreBitsClear(&bm, 0, 1); - ok (bRet, "didnt find set bits"); + ok (bRet, "didnt find set bits\n"); buff[0] = 0xff; pRtlClearBits(&bm, 7, 2); bRet = pRtlAreBitsClear(&bm, 7, 2); - ok(bRet, "didnt find w/len < 8"); + ok(bRet, "didnt find w/len < 8\n"); bRet = pRtlAreBitsClear(&bm, 6, 3); - ok(!bRet, "found non clear bit"); + ok(!bRet, "found non clear bit\n"); bRet = pRtlAreBitsClear(&bm, 7, 3); - ok(!bRet, "found non clear bit"); + ok(!bRet, "found non clear bit\n"); buff[0] = buff[1] = 0xff; pRtlClearBits(&bm, 7, 10); bRet = pRtlAreBitsClear(&bm, 7, 10); - ok(bRet, "didnt find w/len < 8"); + ok(bRet, "didnt find w/len < 8\n"); bRet = pRtlAreBitsClear(&bm, 6, 11); - ok(!bRet, "found non clear bit"); + ok(!bRet, "found non clear bit\n"); bRet = pRtlAreBitsClear(&bm, 7, 11); - ok(!bRet, "found non clear bit"); + ok(!bRet, "found non clear bit\n"); buff[0] = buff[1] = buff[2] = 0xff; pRtlClearBits(&bm, 0, 8); /* 1st byte */ bRet = pRtlAreBitsClear(&bm, 0, 8); - ok(bRet, "didn't find whole byte"); + ok(bRet, "didn't find whole byte\n"); pRtlClearBits(&bm, sizeof(buff)*8-1, 1); bRet = pRtlAreBitsClear(&bm, sizeof(buff)*8-1, 1); - ok(bRet, "didn't find last bit"); + ok(bRet, "didn't find last bit\n"); } static void test_RtlNumberOfSetBits() @@ -321,23 +321,23 @@ pRtlInitializeBitMap(&bm, buff, sizeof(buff)*8); ulCount = pRtlNumberOfSetBits(&bm); - ok(ulCount == 0, "set bits after init"); + ok(ulCount == 0, "set bits after init\n"); pRtlSetBits(&bm, 0, 1); /* Set 1st bit */ ulCount = pRtlNumberOfSetBits(&bm); - ok(ulCount == 1, "count wrong"); + ok(ulCount == 1, "count wrong\n"); pRtlSetBits(&bm, 7, 8); /* 8 more, spanning bytes 1-2 */ ulCount = pRtlNumberOfSetBits(&bm); - ok(ulCount == 8+1, "count wrong"); + ok(ulCount == 8+1, "count wrong\n"); pRtlSetBits(&bm, 17, 33); /* 33 more crossing ULONG boundary */ ulCount = pRtlNumberOfSetBits(&bm); - ok(ulCount == 8+1+33, "count wrong"); + ok(ulCount == 8+1+33, "count wrong\n"); pRtlSetBits(&bm, sizeof(buff)*8-1, 1); /* Set last bit */ ulCount = pRtlNumberOfSetBits(&bm); - ok(ulCount == 8+1+33+1, "count wrong"); + ok(ulCount == 8+1+33+1, "count wrong\n"); } static void test_RtlNumberOfClearBits() @@ -351,23 +351,23 @@ pRtlInitializeBitMap(&bm, buff, sizeof(buff)*8); ulCount = pRtlNumberOfClearBits(&bm); - ok(ulCount == 0, "cleared bits after init"); + ok(ulCount == 0, "cleared bits after init\n"); pRtlClearBits(&bm, 0, 1); /* Set 1st bit */ ulCount = pRtlNumberOfClearBits(&bm); - ok(ulCount == 1, "count wrong"); + ok(ulCount == 1, "count wrong\n"); pRtlClearBits(&bm, 7, 8); /* 8 more, spanning bytes 1-2 */ ulCount = pRtlNumberOfClearBits(&bm); - ok(ulCount == 8+1, "count wrong"); + ok(ulCount == 8+1, "count wrong\n"); pRtlClearBits(&bm, 17, 33); /* 33 more crossing ULONG boundary */ ulCount = pRtlNumberOfClearBits(&bm); - ok(ulCount == 8+1+33, "count wrong"); + ok(ulCount == 8+1+33, "count wrong\n"); pRtlClearBits(&bm, sizeof(buff)*8-1, 1); /* Set last bit */ ulCount = pRtlNumberOfClearBits(&bm); - ok(ulCount == 8+1+33+1, "count wrong"); + ok(ulCount == 8+1+33+1, "count wrong\n"); } /* Note: this tests RtlFindSetBits also */ @@ -384,21 +384,21 @@ pRtlSetBits(&bm, 0, 32); ulPos = pRtlFindSetBitsAndClear(&bm, 32, 0); - ok (ulPos == 0, "didnt find bits"); + ok (ulPos == 0, "didnt find bits\n"); if(ulPos == 0) { bRet = pRtlAreBitsClear(&bm, 0, 32); - ok (bRet, "found but didnt clear"); + ok (bRet, "found but didnt clear\n"); } memset(buff, 0 , sizeof(buff)); pRtlSetBits(&bm, 40, 77); ulPos = pRtlFindSetBitsAndClear(&bm, 77, 0); - ok (ulPos == 40, "didnt find bits"); + ok (ulPos == 40, "didnt find bits\n"); if(ulPos == 40) { bRet = pRtlAreBitsClear(&bm, 40, 77); - ok (bRet, "found but didnt clear"); + ok (bRet, "found but didnt clear\n"); } } @@ -416,21 +416,21 @@ memset(buff, 0xff, sizeof(buff)); pRtlSetBits(&bm, 0, 32); ulPos = pRtlFindSetBitsAndClear(&bm, 32, 0); - ok (ulPos == 0, "didnt find bits"); + ok (ulPos == 0, "didnt find bits\n"); if(ulPos == 0) { bRet = pRtlAreBitsClear(&bm, 0, 32); - ok (bRet, "found but didnt clear"); + ok (bRet, "found but didnt clear\n"); } memset(buff, 0xff , sizeof(buff)); pRtlClearBits(&bm, 40, 77); ulPos = pRtlFindClearBitsAndSet(&bm, 77, 50); - ok (ulPos == 40, "didnt find bits"); + ok (ulPos == 40, "didnt find bits\n"); if(ulPos == 40) { bRet = pRtlAreBitsSet(&bm, 40, 77); - ok (bRet, "found but didnt set"); + ok (bRet, "found but didnt set\n"); } } @@ -449,16 +449,16 @@ ulLong <<= i; cPos = pRtlFindMostSignificantBit(ulLong); - ok (cPos == i, "didnt find MSB %llx %d %d", ulLong, i, cPos); + ok (cPos == i, "didnt find MSB %llx %d %d\n", ulLong, i, cPos); /* Set all bits lower than bit i */ ulLong = ((ulLong - 1) << 1) | 1; cPos = pRtlFindMostSignificantBit(ulLong); - ok (cPos == i, "didnt find MSB %llx %d %d", ulLong, i, cPos); + ok (cPos == i, "didnt find MSB %llx %d %d\n", ulLong, i, cPos); } cPos = pRtlFindMostSignificantBit(0); - ok (cPos == -1, "found bit when not set"); + ok (cPos == -1, "found bit when not set\n"); } static void test_RtlFindLeastSignificantBit() @@ -475,15 +475,15 @@ ulLong = (ULONGLONG)1 << i; cPos = pRtlFindLeastSignificantBit(ulLong); - ok (cPos == i, "didnt find LSB %llx %d %d", ulLong, i, cPos); + ok (cPos == i, "didnt find LSB %llx %d %d\n", ulLong, i, cPos); ulLong = ~((ULONGLONG)0) << i; cPos = pRtlFindLeastSignificantBit(ulLong); - ok (cPos == i, "didnt find LSB %llx %d %d", ulLong, i, cPos); + ok (cPos == i, "didnt find LSB %llx %d %d\n", ulLong, i, cPos); } cPos = pRtlFindLeastSignificantBit(0); - ok (cPos == -1, "found bit when not set"); + ok (cPos == -1, "found bit when not set\n"); } /* Note: Also tests RtlFindLongestRunSet() */ @@ -499,14 +499,14 @@ memset(buff, 0, sizeof(buff)); ulCount = pRtlFindSetRuns(&bm, runs, 16, TRUE); - ok (ulCount == 0, "found set bits in empty bitmap"); + ok (ulCount == 0, "found set bits in empty bitmap\n"); memset(runs, 0, sizeof(runs)); memset(buff, 0xff, sizeof(buff)); ulCount = pRtlFindSetRuns(&bm, runs, 16, TRUE); - ok (ulCount == 1, "didnt find set bits"); - ok (runs[0].StartOfRun == 0,"bad start"); - ok (runs[0].SizeOfRun == sizeof(buff)*8,"bad size"); + ok (ulCount == 1, "didnt find set bits\n"); + ok (runs[0].StartOfRun == 0,"bad start\n"); + ok (runs[0].SizeOfRun == sizeof(buff)*8,"bad size\n"); /* Set up 3 runs */ memset(runs, 0, sizeof(runs)); @@ -517,46 +517,46 @@ /* Get first 2 */ ulCount = pRtlFindSetRuns(&bm, runs, 2, FALSE); - ok (runs[0].StartOfRun == 7 || runs[0].StartOfRun == 101,"bad find"); - ok (runs[1].StartOfRun == 7 || runs[1].StartOfRun == 101,"bad find"); - ok (runs[0].SizeOfRun + runs[1].SizeOfRun == 19 + 3,"bad size"); - ok (runs[0].StartOfRun != runs[1].StartOfRun,"found run twice"); - ok (runs[2].StartOfRun == 0,"found extra run"); + ok (runs[0].StartOfRun == 7 || runs[0].StartOfRun == 101,"bad find\n"); + ok (runs[1].StartOfRun == 7 || runs[1].StartOfRun == 101,"bad find\n"); + ok (runs[0].SizeOfRun + runs[1].SizeOfRun == 19 + 3,"bad size\n"); + ok (runs[0].StartOfRun != runs[1].StartOfRun,"found run twice\n"); + ok (runs[2].StartOfRun == 0,"found extra run\n"); /* Get longest 3 */ memset(runs, 0, sizeof(runs)); ulCount = pRtlFindSetRuns(&bm, runs, 2, TRUE); - ok (runs[0].StartOfRun == 7 || runs[0].StartOfRun == 1877,"bad find"); - ok (runs[1].StartOfRun == 7 || runs[1].StartOfRun == 1877,"bad find"); - ok (runs[0].SizeOfRun + runs[1].SizeOfRun == 33 + 19,"bad size"); - ok (runs[0].StartOfRun != runs[1].StartOfRun,"found run twice"); - ok (runs[2].StartOfRun == 0,"found extra run"); + ok (runs[0].StartOfRun == 7 || runs[0].StartOfRun == 1877,"bad find\n"); + ok (runs[1].StartOfRun == 7 || runs[1].StartOfRun == 1877,"bad find\n"); + ok (runs[0].SizeOfRun + runs[1].SizeOfRun == 33 + 19,"bad size\n"); + ok (runs[0].StartOfRun != runs[1].StartOfRun,"found run twice\n"); + ok (runs[2].StartOfRun == 0,"found extra run\n"); /* Get all 3 */ memset(runs, 0, sizeof(runs)); ulCount = pRtlFindSetRuns(&bm, runs, 3, TRUE); ok (runs[0].StartOfRun == 7 || runs[0].StartOfRun == 101 || - runs[0].StartOfRun == 1877,"bad find"); + runs[0].StartOfRun == 1877,"bad find\n"); ok (runs[1].StartOfRun == 7 || runs[1].StartOfRun == 101 || - runs[1].StartOfRun == 1877,"bad find"); + runs[1].StartOfRun == 1877,"bad find\n"); ok (runs[2].StartOfRun == 7 || runs[2].StartOfRun == 101 || - runs[2].StartOfRun == 1877,"bad find"); + runs[2].StartOfRun == 1877,"bad find\n"); ok (runs[0].SizeOfRun + runs[1].SizeOfRun - + runs[2].SizeOfRun == 19 + 3 + 33,"bad size"); - ok (runs[0].StartOfRun != runs[1].StartOfRun,"found run twice"); - ok (runs[1].StartOfRun != runs[2].StartOfRun,"found run twice"); - ok (runs[3].StartOfRun == 0,"found extra run"); + + runs[2].SizeOfRun == 19 + 3 + 33,"bad size\n"); + ok (runs[0].StartOfRun != runs[1].StartOfRun,"found run twice\n"); + ok (runs[1].StartOfRun != runs[2].StartOfRun,"found run twice\n"); + ok (runs[3].StartOfRun == 0,"found extra run\n"); if (pRtlFindLongestRunSet) { ULONG ulStart = 0; ulCount = pRtlFindLongestRunSet(&bm, &ulStart); - ok(ulCount == 33 && ulStart == 1877,"didn't find longest %ld %ld",ulCount,ulStart); + ok(ulCount == 33 && ulStart == 1877,"didn't find longest %ld %ld\n",ulCount,ulStart); memset(buff, 0, sizeof(buff)); ulCount = pRtlFindLongestRunSet(&bm, &ulStart); - ok(ulCount == 0,"found longest when none set"); + ok(ulCount == 0,"found longest when none set\n"); } } @@ -573,14 +573,14 @@ memset(buff, 0xff, sizeof(buff)); ulCount = pRtlFindClearRuns(&bm, runs, 16, TRUE); - ok (ulCount == 0, "found clear bits in full bitmap"); + ok (ulCount == 0, "found clear bits in full bitmap\n"); memset(runs, 0, sizeof(runs)); memset(buff, 0, sizeof(buff)); ulCount = pRtlFindClearRuns(&bm, runs, 16, TRUE); - ok (ulCount == 1, "didnt find clear bits"); - ok (runs[0].StartOfRun == 0,"bad start"); - ok (runs[0].SizeOfRun == sizeof(buff)*8,"bad size"); + ok (ulCount == 1, "didnt find clear bits\n"); + ok (runs[0].StartOfRun == 0,"bad start\n"); + ok (runs[0].SizeOfRun == sizeof(buff)*8,"bad size\n"); /* Set up 3 runs */ memset(runs, 0, sizeof(runs)); @@ -591,46 +591,46 @@ /* Get first 2 */ ulCount = pRtlFindClearRuns(&bm, runs, 2, FALSE); - ok (runs[0].StartOfRun == 7 || runs[0].StartOfRun == 101,"bad find"); - ok (runs[1].StartOfRun == 7 || runs[1].StartOfRun == 101,"bad find"); - ok (runs[0].SizeOfRun + runs[1].SizeOfRun == 19 + 3,"bad size"); - ok (runs[0].StartOfRun != runs[1].StartOfRun,"found run twice"); - ok (runs[2].StartOfRun == 0,"found extra run"); + ok (runs[0].StartOfRun == 7 || runs[0].StartOfRun == 101,"bad find\n"); + ok (runs[1].StartOfRun == 7 || runs[1].StartOfRun == 101,"bad find\n"); + ok (runs[0].SizeOfRun + runs[1].SizeOfRun == 19 + 3,"bad size\n"); + ok (runs[0].StartOfRun != runs[1].StartOfRun,"found run twice\n"); + ok (runs[2].StartOfRun == 0,"found extra run\n"); /* Get longest 3 */ memset(runs, 0, sizeof(runs)); ulCount = pRtlFindClearRuns(&bm, runs, 2, TRUE); - ok (runs[0].StartOfRun == 7 || runs[0].StartOfRun == 1877,"bad find"); - ok (runs[1].StartOfRun == 7 || runs[1].StartOfRun == 1877,"bad find"); - ok (runs[0].SizeOfRun + runs[1].SizeOfRun == 33 + 19,"bad size"); - ok (runs[0].StartOfRun != runs[1].StartOfRun,"found run twice"); - ok (runs[2].StartOfRun == 0,"found extra run"); + ok (runs[0].StartOfRun == 7 || runs[0].StartOfRun == 1877,"bad find\n"); + ok (runs[1].StartOfRun == 7 || runs[1].StartOfRun == 1877,"bad find\n"); + ok (runs[0].SizeOfRun + runs[1].SizeOfRun == 33 + 19,"bad size\n"); + ok (runs[0].StartOfRun != runs[1].StartOfRun,"found run twice\n"); + ok (runs[2].StartOfRun == 0,"found extra run\n"); /* Get all 3 */ memset(runs, 0, sizeof(runs)); ulCount = pRtlFindClearRuns(&bm, runs, 3, TRUE); ok (runs[0].StartOfRun == 7 || runs[0].StartOfRun == 101 || - runs[0].StartOfRun == 1877,"bad find"); + runs[0].StartOfRun == 1877,"bad find\n"); ok (runs[1].StartOfRun == 7 || runs[1].StartOfRun == 101 || - runs[1].StartOfRun == 1877,"bad find"); + runs[1].StartOfRun == 1877,"bad find\n"); ok (runs[2].StartOfRun == 7 || runs[2].StartOfRun == 101 || - runs[2].StartOfRun == 1877,"bad find"); + runs[2].StartOfRun == 1877,"bad find\n"); ok (runs[0].SizeOfRun + runs[1].SizeOfRun - + runs[2].SizeOfRun == 19 + 3 + 33,"bad size"); - ok (runs[0].StartOfRun != runs[1].StartOfRun,"found run twice"); - ok (runs[1].StartOfRun != runs[2].StartOfRun,"found run twice"); - ok (runs[3].StartOfRun == 0,"found extra run"); + + runs[2].SizeOfRun == 19 + 3 + 33,"bad size\n"); + ok (runs[0].StartOfRun != runs[1].StartOfRun,"found run twice\n"); + ok (runs[1].StartOfRun != runs[2].StartOfRun,"found run twice\n"); + ok (runs[3].StartOfRun == 0,"found extra run\n"); if (pRtlFindLongestRunClear) { ULONG ulStart = 0; ulCount = pRtlFindLongestRunClear(&bm, &ulStart); - ok(ulCount == 33 && ulStart == 1877,"didn't find longest"); + ok(ulCount == 33 && ulStart == 1877,"didn't find longest\n"); memset(buff, 0xff, sizeof(buff)); ulCount = pRtlFindLongestRunClear(&bm, &ulStart); - ok(ulCount == 0,"found longest when none clear"); + ok(ulCount == 0,"found longest when none clear\n"); } } Index: dlls/ntdll/tests/rtlstr.c =================================================================== RCS file: /home/cvs/wine/dlls/ntdll/tests/rtlstr.c,v retrieving revision 1.13 diff -u -r1.13 rtlstr.c --- dlls/ntdll/tests/rtlstr.c 6 Oct 2003 21:03:32 -0000 1.13 +++ dlls/ntdll/tests/rtlstr.c 17 Oct 2003 13:53:19 -0000 @@ -100,7 +100,7 @@ static void InitFunctionPtrs(void) { hntdll = LoadLibraryA("ntdll.dll"); - ok(hntdll != 0, "LoadLibrary failed"); + ok(hntdll != 0, "LoadLibrary failed\n"); if (hntdll) { pRtlAnsiStringToUnicodeString = (void *)GetProcAddress(hntdll, "RtlAnsiStringToUnicodeString"); pRtlAppendAsciizToString = (void *)GetProcAddress(hntdll, "RtlAppendAsciizToString"); @@ -143,14 +143,14 @@ str.MaximumLength = 0; str.Buffer = (void *)0xdeadbeef; pRtlInitString(&str, teststring); - ok(str.Length == sizeof(teststring) - sizeof(char), "Length uninitialized"); - ok(str.MaximumLength == sizeof(teststring), "MaximumLength uninitialized"); - ok(str.Buffer == teststring, "Buffer not equal to teststring"); - ok(strcmp(str.Buffer, "Some Wild String") == 0, "Buffer written to"); + ok(str.Length == sizeof(teststring) - sizeof(char), "Length uninitialized\n"); + ok(str.MaximumLength == sizeof(teststring), "MaximumLength uninitialized\n"); + ok(str.Buffer == teststring, "Buffer not equal to teststring\n"); + ok(strcmp(str.Buffer, "Some Wild String") == 0, "Buffer written to\n"); pRtlInitString(&str, NULL); - ok(str.Length == 0, "Length uninitialized"); - ok(str.MaximumLength == 0, "MaximumLength uninitialized"); - ok(str.Buffer == NULL, "Buffer not equal to NULL"); + ok(str.Length == 0, "Length uninitialized\n"); + ok(str.MaximumLength == 0, "MaximumLength uninitialized\n"); + ok(str.Buffer == NULL, "Buffer not equal to NULL\n"); /* pRtlInitString(NULL, teststring); */ } @@ -167,14 +167,14 @@ uni.MaximumLength = 0; uni.Buffer = (void *)0xdeadbeef; pRtlInitUnicodeString(&uni, teststring); - ok(uni.Length == sizeof(teststring) - sizeof(WCHAR), "Length uninitialized"); - ok(uni.MaximumLength == sizeof(teststring), "MaximumLength uninitialized"); - ok(uni.Buffer == teststring, "Buffer not equal to teststring"); - ok(lstrcmpW(uni.Buffer, originalstring) == 0, "Buffer written to"); + ok(uni.Length == sizeof(teststring) - sizeof(WCHAR), "Length uninitialized\n"); + ok(uni.MaximumLength == sizeof(teststring), "MaximumLength uninitialized\n"); + ok(uni.Buffer == teststring, "Buffer not equal to teststring\n"); + ok(lstrcmpW(uni.Buffer, originalstring) == 0, "Buffer written to\n"); pRtlInitUnicodeString(&uni, NULL); - ok(uni.Length == 0, "Length uninitialized"); - ok(uni.MaximumLength == 0, "MaximumLength uninitialized"); - ok(uni.Buffer == NULL, "Buffer not equal to NULL"); + ok(uni.Length == 0, "Length uninitialized\n"); + ok(uni.MaximumLength == 0, "MaximumLength uninitialized\n"); + ok(uni.Buffer == NULL, "Buffer not equal to NULL\n"); /* pRtlInitUnicodeString(NULL, teststring); */ } @@ -199,16 +199,16 @@ uni.Buffer = (void *) 0xdeadbeef; result = pRtlInitUnicodeStringEx(&uni, teststring); ok(result == STATUS_SUCCESS, - "pRtlInitUnicodeStringEx(&uni, 0) returns %lx, expected %x", + "pRtlInitUnicodeStringEx(&uni, 0) returns %lx, expected %x\n", result, STATUS_SUCCESS); ok(uni.Length == 32, - "pRtlInitUnicodeStringEx(&uni, 0) sets Length to %u, expected %u", + "pRtlInitUnicodeStringEx(&uni, 0) sets Length to %u, expected %u\n", uni.Length, 32); ok(uni.MaximumLength == 34, - "pRtlInitUnicodeStringEx(&uni, 0) sets MaximumLength to %u, expected %u", + "pRtlInitUnicodeStringEx(&uni, 0) sets MaximumLength to %u, expected %u\n", uni.MaximumLength, 34); ok(uni.Buffer == teststring, - "pRtlInitUnicodeStringEx(&uni, 0) sets Buffer to %p, expected %p", + "pRtlInitUnicodeStringEx(&uni, 0) sets Buffer to %p, expected %p\n", uni.Buffer, teststring); uni.Length = 12345; @@ -216,13 +216,13 @@ uni.Buffer = (void *) 0xdeadbeef; pRtlInitUnicodeString(&uni, teststring); ok(uni.Length == 32, - "pRtlInitUnicodeString(&uni, 0) sets Length to %u, expected %u", + "pRtlInitUnicodeString(&uni, 0) sets Length to %u, expected %u\n", uni.Length, 32); ok(uni.MaximumLength == 34, - "pRtlInitUnicodeString(&uni, 0) sets MaximumLength to %u, expected %u", + "pRtlInitUnicodeString(&uni, 0) sets MaximumLength to %u, expected %u\n", uni.MaximumLength, 34); ok(uni.Buffer == teststring, - "pRtlInitUnicodeString(&uni, 0) sets Buffer to %p, expected %p", + "pRtlInitUnicodeString(&uni, 0) sets Buffer to %p, expected %p\n", uni.Buffer, teststring); uni.Length = 12345; @@ -230,16 +230,16 @@ uni.Buffer = (void *) 0xdeadbeef; result = pRtlInitUnicodeStringEx(&uni, teststring2); ok(result == STATUS_NAME_TOO_LONG, - "pRtlInitUnicodeStringEx(&uni, 0) returns %lx, expected %x", + "pRtlInitUnicodeStringEx(&uni, 0) returns %lx, expected %x\n", result, STATUS_NAME_TOO_LONG); ok(uni.Length == 12345, - "pRtlInitUnicodeStringEx(&uni, 0) sets Length to %u, expected %u", + "pRtlInitUnicodeStringEx(&uni, 0) sets Length to %u, expected %u\n", uni.Length, 12345); ok(uni.MaximumLength == 12345, - "pRtlInitUnicodeStringEx(&uni, 0) sets MaximumLength to %u, expected %u", + "pRtlInitUnicodeStringEx(&uni, 0) sets MaximumLength to %u, expected %u\n", uni.MaximumLength, 12345); ok(uni.Buffer == (void *) 0xdeadbeef, - "pRtlInitUnicodeStringEx(&uni, 0) sets Buffer to %p, expected %x", + "pRtlInitUnicodeStringEx(&uni, 0) sets Buffer to %p, expected %x\n", uni.Buffer, 0xdeadbeef); uni.Length = 12345; @@ -247,32 +247,32 @@ uni.Buffer = (void *) 0xdeadbeef; pRtlInitUnicodeString(&uni, teststring2); ok(uni.Length == 33920, - "pRtlInitUnicodeString(&uni, 0) sets Length to %u, expected %u", + "pRtlInitUnicodeString(&uni, 0) sets Length to %u, expected %u\n", uni.Length, 33920); ok(uni.MaximumLength == 33922, - "pRtlInitUnicodeString(&uni, 0) sets MaximumLength to %u, expected %u", + "pRtlInitUnicodeString(&uni, 0) sets MaximumLength to %u, expected %u\n", uni.MaximumLength, 33922); ok(uni.Buffer == teststring2, - "pRtlInitUnicodeString(&uni, 0) sets Buffer to %p, expected %p", + "pRtlInitUnicodeString(&uni, 0) sets Buffer to %p, expected %p\n", uni.Buffer, teststring2); ok(memcmp(uni.Buffer, teststring2, (TESTSTRING2_LEN + 1) * sizeof(WCHAR)) == 0, - "pRtlInitUnicodeString(&uni, 0) changes Buffer"); + "pRtlInitUnicodeString(&uni, 0) changes Buffer\n"); uni.Length = 12345; uni.MaximumLength = 12345; uni.Buffer = (void *) 0xdeadbeef; result = pRtlInitUnicodeStringEx(&uni, 0); ok(result == STATUS_SUCCESS, - "pRtlInitUnicodeStringEx(&uni, 0) returns %lx, expected %x", + "pRtlInitUnicodeStringEx(&uni, 0) returns %lx, expected %x\n", result, STATUS_SUCCESS); ok(uni.Length == 0, - "pRtlInitUnicodeStringEx(&uni, 0) sets Length to %u, expected %u", + "pRtlInitUnicodeStringEx(&uni, 0) sets Length to %u, expected %u\n", uni.Length, 0); ok(uni.MaximumLength == 0, - "pRtlInitUnicodeStringEx(&uni, 0) sets MaximumLength to %u, expected %u", + "pRtlInitUnicodeStringEx(&uni, 0) sets MaximumLength to %u, expected %u\n", uni.MaximumLength, 0); ok(uni.Buffer == NULL, - "pRtlInitUnicodeStringEx(&uni, 0) sets Buffer to %p, expected %p", + "pRtlInitUnicodeStringEx(&uni, 0) sets Buffer to %p, expected %p\n", uni.Buffer, NULL); uni.Length = 12345; @@ -280,13 +280,13 @@ uni.Buffer = (void *) 0xdeadbeef; pRtlInitUnicodeString(&uni, 0); ok(uni.Length == 0, - "pRtlInitUnicodeString(&uni, 0) sets Length to %u, expected %u", + "pRtlInitUnicodeString(&uni, 0) sets Length to %u, expected %u\n", uni.Length, 0); ok(uni.MaximumLength == 0, - "pRtlInitUnicodeString(&uni, 0) sets MaximumLength to %u, expected %u", + "pRtlInitUnicodeString(&uni, 0) sets MaximumLength to %u, expected %u\n", uni.MaximumLength, 0); ok(uni.Buffer == NULL, - "pRtlInitUnicodeString(&uni, 0) sets Buffer to %p, expected %p", + "pRtlInitUnicodeString(&uni, 0) sets Buffer to %p, expected %p\n", uni.Buffer, NULL); } @@ -439,31 +439,31 @@ dest_ansi_buf[dest_ansi_str.Length] = '\0'; dest_ansi_str.Buffer = dest_ansi_buf; ok(result == dupl_ustr[test_num].result, - "(test %d): RtlDuplicateUnicodeString(%d, source, dest) has result %lx, expected %lx", + "(test %d): RtlDuplicateUnicodeString(%d, source, dest) has result %lx, expected %lx\n", test_num, dupl_ustr[test_num].add_nul, result, dupl_ustr[test_num].result); ok(dest_str.Length == dupl_ustr[test_num].res_Length, - "(test %d): RtlDuplicateUnicodeString(%d, source, dest) destination has Length %d, expected %d", + "(test %d): RtlDuplicateUnicodeString(%d, source, dest) destination has Length %d, expected %d\n", test_num, dupl_ustr[test_num].add_nul, dest_str.Length, dupl_ustr[test_num].res_Length); ok(dest_str.MaximumLength == dupl_ustr[test_num].res_MaximumLength, - "(test %d): RtlDuplicateUnicodeString(%d, source, dest) destination has MaximumLength %d, expected %d", + "(test %d): RtlDuplicateUnicodeString(%d, source, dest) destination has MaximumLength %d, expected %d\n", test_num, dupl_ustr[test_num].add_nul, dest_str.MaximumLength, dupl_ustr[test_num].res_MaximumLength); if (result == STATUS_INVALID_PARAMETER) { ok((dest_str.Buffer == NULL && res_str.Buffer == NULL) || dest_str.Buffer == dest_buf, - "(test %d): RtlDuplicateUnicodeString(%d, source, dest) destination buffer changed %p expected %p", + "(test %d): RtlDuplicateUnicodeString(%d, source, dest) destination buffer changed %p expected %p\n", test_num, dupl_ustr[test_num].add_nul, dest_str.Buffer, dest_buf); } else { ok(dest_str.Buffer != dest_buf, - "(test %d): RtlDuplicateUnicodeString(%d, source, dest) has destination buffer unchanged %p", + "(test %d): RtlDuplicateUnicodeString(%d, source, dest) has destination buffer unchanged %p\n", test_num, dupl_ustr[test_num].add_nul, dest_str.Buffer); } /* if */ if (dest_str.Buffer != NULL && dupl_ustr[test_num].res_buf != NULL) { ok(memcmp(dest_str.Buffer, res_str.Buffer, dupl_ustr[test_num].res_buf_size) == 0, - "(test %d): RtlDuplicateUnicodeString(%d, source, dest) has destination \"%s\" expected \"%s\"", + "(test %d): RtlDuplicateUnicodeString(%d, source, dest) has destination \"%s\" expected \"%s\"\n", test_num, dupl_ustr[test_num].add_nul, dest_ansi_str.Buffer, dupl_ustr[test_num].res_buf); } else { ok(dest_str.Buffer == NULL && dupl_ustr[test_num].res_buf == NULL, - "(test %d): RtlDuplicateUnicodeString(%d, source, dest) has destination %p expected %p", + "(test %d): RtlDuplicateUnicodeString(%d, source, dest) has destination %p expected %p\n", test_num, dupl_ustr[test_num].add_nul, dest_str.Buffer, dupl_ustr[test_num].res_buf); } /* if */ } /* for */ @@ -480,7 +480,7 @@ pRtlInitString(&str, teststring); pRtlInitString(&deststr, deststring); pRtlCopyString(&deststr, &str); - ok(strncmp(str.Buffer, deststring, str.Length) == 0, "String not copied"); + ok(strncmp(str.Buffer, deststring, str.Length) == 0, "String not copied\n"); } @@ -500,7 +500,7 @@ expected_upper_ch = (CHAR) byte_ch; } /* if */ ok(upper_ch == expected_upper_ch, - "RtlUpperChar('%c'[=0x%x]) has result '%c'[=0x%x], expected '%c'[=0x%x]", + "RtlUpperChar('%c'[=0x%x]) has result '%c'[=0x%x], expected '%c'[=0x%x]\n", ch, ch, upper_ch, upper_ch, expected_upper_ch, expected_upper_ch); } /* for */ } @@ -544,7 +544,7 @@ pRtlUpperString(&result_str, &ascii_str); ok(memcmp(result_str.Buffer, upper_str.Buffer, 256) == 0, - "RtlUpperString does not work as expected"); + "RtlUpperString does not work as expected\n"); } @@ -568,7 +568,7 @@ expected_upper_ch = ch; } /* if */ ok(upper_ch == expected_upper_ch, - "RtlUpcaseUnicodeChar('%c'[=0x%x]) has result '%c'[=0x%x], expected: '%c'[=0x%x]", + "RtlUpcaseUnicodeChar('%c'[=0x%x]) has result '%c'[=0x%x], expected: '%c'[=0x%x]\n", ch, ch, upper_ch, upper_ch, expected_upper_ch, expected_upper_ch); } /* for */ } @@ -617,7 +617,7 @@ pRtlUpcaseUnicodeString(&result_str, &ascii_str, 0); for (i = 0; i <= 255; i++) { ok(result_str.Buffer[i] == upper_str.Buffer[i], - "RtlUpcaseUnicodeString works wrong: '%c'[=0x%x] is converted to '%c'[=0x%x], expected: '%c'[=0x%x]", + "RtlUpcaseUnicodeString works wrong: '%c'[=0x%x] is converted to '%c'[=0x%x], expected: '%c'[=0x%x]\n", ascii_str.Buffer[i], ascii_str.Buffer[i], result_str.Buffer[i], result_str.Buffer[i], upper_str.Buffer[i], upper_str.Buffer[i]); @@ -702,7 +702,7 @@ pRtlDowncaseUnicodeString(&result_str, &source_str, 0); for (i = 0; i <= 1024; i++) { ok(result_str.Buffer[i] == lower_str.Buffer[i] || result_str.Buffer[i] == source_str.Buffer[i] + 1, - "RtlDowncaseUnicodeString works wrong: '%c'[=0x%x] is converted to '%c'[=0x%x], expected: '%c'[=0x%x]", + "RtlDowncaseUnicodeString works wrong: '%c'[=0x%x] is converted to '%c'[=0x%x], expected: '%c'[=0x%x]\n", source_str.Buffer[i], source_str.Buffer[i], result_str.Buffer[i], result_str.Buffer[i], lower_str.Buffer[i], lower_str.Buffer[i]); @@ -778,16 +778,16 @@ } /* if */ result = pRtlUnicodeStringToAnsiString(&ansi_str, &uni_str, ustr2astr[test_num].doalloc); ok(result == ustr2astr[test_num].result, - "(test %d): RtlUnicodeStringToAnsiString(ansi, uni, %d) has result %lx, expected %lx", + "(test %d): RtlUnicodeStringToAnsiString(ansi, uni, %d) has result %lx, expected %lx\n", test_num, ustr2astr[test_num].doalloc, result, ustr2astr[test_num].result); ok(ansi_str.Length == ustr2astr[test_num].res_Length, - "(test %d): RtlUnicodeStringToAnsiString(ansi, uni, %d) ansi has Length %d, expected %d", + "(test %d): RtlUnicodeStringToAnsiString(ansi, uni, %d) ansi has Length %d, expected %d\n", test_num, ustr2astr[test_num].doalloc, ansi_str.Length, ustr2astr[test_num].res_Length); ok(ansi_str.MaximumLength == ustr2astr[test_num].res_MaximumLength, - "(test %d): RtlUnicodeStringToAnsiString(ansi, uni, %d) ansi has MaximumLength %d, expected %d", + "(test %d): RtlUnicodeStringToAnsiString(ansi, uni, %d) ansi has MaximumLength %d, expected %d\n", test_num, ustr2astr[test_num].doalloc, ansi_str.MaximumLength, ustr2astr[test_num].res_MaximumLength); ok(memcmp(ansi_str.Buffer, ustr2astr[test_num].res_buf, ustr2astr[test_num].res_buf_size) == 0, - "(test %d): RtlUnicodeStringToAnsiString(ansi, uni, %d) has ansi \"%s\" expected \"%s\"", + "(test %d): RtlUnicodeStringToAnsiString(ansi, uni, %d) has ansi \"%s\" expected \"%s\"\n", test_num, ustr2astr[test_num].doalloc, ansi_str.Buffer, ustr2astr[test_num].res_buf); } /* for */ } @@ -839,21 +839,21 @@ } /* if */ result = pRtlAppendAsciizToString(&dest_str, app_asc2str[test_num].src); ok(result == app_asc2str[test_num].result, - "(test %d): RtlAppendAsciizToString(dest, src) has result %lx, expected %lx", + "(test %d): RtlAppendAsciizToString(dest, src) has result %lx, expected %lx\n", test_num, result, app_asc2str[test_num].result); ok(dest_str.Length == app_asc2str[test_num].res_Length, - "(test %d): RtlAppendAsciizToString(dest, src) dest has Length %d, expected %d", + "(test %d): RtlAppendAsciizToString(dest, src) dest has Length %d, expected %d\n", test_num, dest_str.Length, app_asc2str[test_num].res_Length); ok(dest_str.MaximumLength == app_asc2str[test_num].res_MaximumLength, - "(test %d): RtlAppendAsciizToString(dest, src) dest has MaximumLength %d, expected %d", + "(test %d): RtlAppendAsciizToString(dest, src) dest has MaximumLength %d, expected %d\n", test_num, dest_str.MaximumLength, app_asc2str[test_num].res_MaximumLength); if (dest_str.Buffer == dest_buf) { ok(memcmp(dest_buf, app_asc2str[test_num].res_buf, app_asc2str[test_num].res_buf_size) == 0, - "(test %d): RtlAppendAsciizToString(dest, src) has dest \"%s\" expected \"%s\"", + "(test %d): RtlAppendAsciizToString(dest, src) has dest \"%s\" expected \"%s\"\n", test_num, dest_buf, app_asc2str[test_num].res_buf); } else { ok(dest_str.Buffer == app_asc2str[test_num].res_buf, - "(test %d): RtlAppendAsciizToString(dest, src) dest has Buffer %p expected %p", + "(test %d): RtlAppendAsciizToString(dest, src) dest has Buffer %p expected %p\n", test_num, dest_str.Buffer, app_asc2str[test_num].res_buf); } /* if */ } /* for */ @@ -920,21 +920,21 @@ } /* if */ result = pRtlAppendStringToString(&dest_str, &src_str); ok(result == app_str2str[test_num].result, - "(test %d): RtlAppendStringToString(dest, src) has result %lx, expected %lx", + "(test %d): RtlAppendStringToString(dest, src) has result %lx, expected %lx\n", test_num, result, app_str2str[test_num].result); ok(dest_str.Length == app_str2str[test_num].res_Length, - "(test %d): RtlAppendStringToString(dest, src) dest has Length %d, expected %d", + "(test %d): RtlAppendStringToString(dest, src) dest has Length %d, expected %d\n", test_num, dest_str.Length, app_str2str[test_num].res_Length); ok(dest_str.MaximumLength == app_str2str[test_num].res_MaximumLength, - "(test %d): RtlAppendStringToString(dest, src) dest has MaximumLength %d, expected %d", + "(test %d): RtlAppendStringToString(dest, src) dest has MaximumLength %d, expected %d\n", test_num, dest_str.MaximumLength, app_str2str[test_num].res_MaximumLength); if (dest_str.Buffer == dest_buf) { ok(memcmp(dest_buf, app_str2str[test_num].res_buf, app_str2str[test_num].res_buf_size) == 0, - "(test %d): RtlAppendStringToString(dest, src) has dest \"%s\" expected \"%s\"", + "(test %d): RtlAppendStringToString(dest, src) has dest \"%s\" expected \"%s\"\n", test_num, dest_buf, app_str2str[test_num].res_buf); } else { ok(dest_str.Buffer == app_str2str[test_num].res_buf, - "(test %d): RtlAppendStringToString(dest, src) dest has Buffer %p expected %p", + "(test %d): RtlAppendStringToString(dest, src) dest has Buffer %p expected %p\n", test_num, dest_str.Buffer, app_str2str[test_num].res_buf); } /* if */ } /* for */ @@ -992,21 +992,21 @@ } /* if */ result = pRtlAppendUnicodeToString(&dest_str, (LPCWSTR) app_uni2str[test_num].src); ok(result == app_uni2str[test_num].result, - "(test %d): RtlAppendUnicodeToString(dest, src) has result %lx, expected %lx", + "(test %d): RtlAppendUnicodeToString(dest, src) has result %lx, expected %lx\n", test_num, result, app_uni2str[test_num].result); ok(dest_str.Length == app_uni2str[test_num].res_Length, - "(test %d): RtlAppendUnicodeToString(dest, src) dest has Length %d, expected %d", + "(test %d): RtlAppendUnicodeToString(dest, src) dest has Length %d, expected %d\n", test_num, dest_str.Length, app_uni2str[test_num].res_Length); ok(dest_str.MaximumLength == app_uni2str[test_num].res_MaximumLength, - "(test %d): RtlAppendUnicodeToString(dest, src) dest has MaximumLength %d, expected %d", + "(test %d): RtlAppendUnicodeToString(dest, src) dest has MaximumLength %d, expected %d\n", test_num, dest_str.MaximumLength, app_uni2str[test_num].res_MaximumLength); if (dest_str.Buffer == dest_buf) { ok(memcmp(dest_buf, app_uni2str[test_num].res_buf, app_uni2str[test_num].res_buf_size) == 0, - "(test %d): RtlAppendUnicodeToString(dest, src) has dest \"%s\" expected \"%s\"", + "(test %d): RtlAppendUnicodeToString(dest, src) has dest \"%s\" expected \"%s\"\n", test_num, (char *) dest_buf, app_uni2str[test_num].res_buf); } else { ok(dest_str.Buffer == (WCHAR *) app_uni2str[test_num].res_buf, - "(test %d): RtlAppendUnicodeToString(dest, src) dest has Buffer %p expected %p", + "(test %d): RtlAppendUnicodeToString(dest, src) dest has Buffer %p expected %p\n", test_num, dest_str.Buffer, app_uni2str[test_num].res_buf); } /* if */ } /* for */ @@ -1077,21 +1077,21 @@ } /* if */ result = pRtlAppendUnicodeStringToString(&dest_str, &src_str); ok(result == app_ustr2str[test_num].result, - "(test %d): RtlAppendStringToString(dest, src) has result %lx, expected %lx", + "(test %d): RtlAppendStringToString(dest, src) has result %lx, expected %lx\n", test_num, result, app_ustr2str[test_num].result); ok(dest_str.Length == app_ustr2str[test_num].res_Length, - "(test %d): RtlAppendStringToString(dest, src) dest has Length %d, expected %d", + "(test %d): RtlAppendStringToString(dest, src) dest has Length %d, expected %d\n", test_num, dest_str.Length, app_ustr2str[test_num].res_Length); ok(dest_str.MaximumLength == app_ustr2str[test_num].res_MaximumLength, - "(test %d): RtlAppendStringToString(dest, src) dest has MaximumLength %d, expected %d", + "(test %d): RtlAppendStringToString(dest, src) dest has MaximumLength %d, expected %d\n", test_num, dest_str.MaximumLength, app_ustr2str[test_num].res_MaximumLength); if (dest_str.Buffer == dest_buf) { ok(memcmp(dest_buf, app_ustr2str[test_num].res_buf, app_ustr2str[test_num].res_buf_size) == 0, - "(test %d): RtlAppendStringToString(dest, src) has dest \"%s\" expected \"%s\"", + "(test %d): RtlAppendStringToString(dest, src) has dest \"%s\" expected \"%s\"\n", test_num, (char *) dest_buf, app_ustr2str[test_num].res_buf); } else { ok(dest_str.Buffer == (WCHAR *) app_ustr2str[test_num].res_buf, - "(test %d): RtlAppendStringToString(dest, src) dest has Buffer %p expected %p", + "(test %d): RtlAppendStringToString(dest, src) dest has Buffer %p expected %p\n", test_num, dest_str.Buffer, app_ustr2str[test_num].res_buf); } /* if */ } /* for */ @@ -1196,12 +1196,12 @@ pos = 12345; result = pRtlFindCharInUnicodeString(find_ch_in_ustr[test_num].flags, &main_str, &search_chars, &pos); ok(result == find_ch_in_ustr[test_num].result, - "(test %d): RtlFindCharInUnicodeString(%d, %s, %s, [out]) has result %lx, expected %lx", + "(test %d): RtlFindCharInUnicodeString(%d, %s, %s, [out]) has result %lx, expected %lx\n", test_num, find_ch_in_ustr[test_num].flags, find_ch_in_ustr[test_num].main_str, find_ch_in_ustr[test_num].search_chars, result, find_ch_in_ustr[test_num].result); ok(pos == find_ch_in_ustr[test_num].pos, - "(test %d): RtlFindCharInUnicodeString(%d, %s, %s, [out]) assigns %d to pos, expected %d", + "(test %d): RtlFindCharInUnicodeString(%d, %s, %s, [out]) assigns %d to pos, expected %d\n", test_num, find_ch_in_ustr[test_num].flags, find_ch_in_ustr[test_num].main_str, find_ch_in_ustr[test_num].search_chars, pos, find_ch_in_ustr[test_num].pos); @@ -1347,10 +1347,10 @@ pRtlInitUnicodeString(&uni, wstr); result = pRtlUnicodeStringToInteger(&uni, str2int[test_num].base, &value); ok(result == str2int[test_num].result, - "(test %d): RtlUnicodeStringToInteger(\"%s\", %d, [out]) has result %lx, expected: %lx", + "(test %d): RtlUnicodeStringToInteger(\"%s\", %d, [out]) has result %lx, expected: %lx\n", test_num, str2int[test_num].str, str2int[test_num].base, result, str2int[test_num].result); ok(value == str2int[test_num].value, - "(test %d): RtlUnicodeStringToInteger(\"%s\", %d, [out]) assigns value %d, expected: %d", + "(test %d): RtlUnicodeStringToInteger(\"%s\", %d, [out]) assigns value %d, expected: %d\n", test_num, str2int[test_num].str, str2int[test_num].base, value, str2int[test_num].value); free(wstr); } /* for */ @@ -1359,38 +1359,38 @@ pRtlInitUnicodeString(&uni, wstr); result = pRtlUnicodeStringToInteger(&uni, str2int[1].base, NULL); ok(result == STATUS_ACCESS_VIOLATION, - "call failed: RtlUnicodeStringToInteger(\"%s\", %d, NULL) has result %lx", + "call failed: RtlUnicodeStringToInteger(\"%s\", %d, NULL) has result %lx\n", str2int[1].str, str2int[1].base, result); result = pRtlUnicodeStringToInteger(&uni, 20, NULL); ok(result == STATUS_INVALID_PARAMETER, - "call failed: RtlUnicodeStringToInteger(\"%s\", 20, NULL) has result %lx", + "call failed: RtlUnicodeStringToInteger(\"%s\", 20, NULL) has result %lx\n", str2int[1].str, result); uni.Length = 10; /* Make Length shorter (5 WCHARS instead of 7) */ result = pRtlUnicodeStringToInteger(&uni, str2int[1].base, &value); ok(result == STATUS_SUCCESS, - "call failed: RtlUnicodeStringToInteger(\"12345\", %d, [out]) has result %lx", + "call failed: RtlUnicodeStringToInteger(\"12345\", %d, [out]) has result %lx\n", str2int[1].base, result); ok(value == 12345, - "didn't return expected value (test a): expected: %d, got: %d", + "didn't return expected value (test a): expected: %d, got: %d\n", 12345, value); uni.Length = 5; /* Use odd Length (2.5 WCHARS) */ result = pRtlUnicodeStringToInteger(&uni, str2int[1].base, &value); ok(result == STATUS_SUCCESS, - "call failed: RtlUnicodeStringToInteger(\"12\", %d, [out]) has result %lx", + "call failed: RtlUnicodeStringToInteger(\"12\", %d, [out]) has result %lx\n", str2int[1].base, result); ok(value == 12, - "didn't return expected value (test b): expected: %d, got: %d", + "didn't return expected value (test b): expected: %d, got: %d\n", 12, value); uni.Length = 2; result = pRtlUnicodeStringToInteger(&uni, str2int[1].base, &value); ok(result == STATUS_SUCCESS, - "call failed: RtlUnicodeStringToInteger(\"1\", %d, [out]) has result %lx", + "call failed: RtlUnicodeStringToInteger(\"1\", %d, [out]) has result %lx\n", str2int[1].base, result); ok(value == 1, - "didn't return expected value (test c): expected: %d, got: %d", + "didn't return expected value (test c): expected: %d, got: %d\n", 1, value); /* w2k: uni.Length = 0 returns value 11234567 instead of 0 */ free(wstr); @@ -1409,22 +1409,22 @@ value = 0xdeadbeef; result = pRtlCharToInteger(str2int[test_num].str, str2int[test_num].base, &value); ok(result == str2int[test_num].result, - "(test %d): call failed: RtlCharToInteger(\"%s\", %d, [out]) has result %lx, expected: %lx", + "(test %d): call failed: RtlCharToInteger(\"%s\", %d, [out]) has result %lx, expected: %lx\n", test_num, str2int[test_num].str, str2int[test_num].base, result, str2int[test_num].result); ok(value == str2int[test_num].value, - "(test %d): call failed: RtlCharToInteger(\"%s\", %d, [out]) assigns value %d, expected: %d", + "(test %d): call failed: RtlCharToInteger(\"%s\", %d, [out]) assigns value %d, expected: %d\n", test_num, str2int[test_num].str, str2int[test_num].base, value, str2int[test_num].value); } /* if */ } /* for */ result = pRtlCharToInteger(str2int[1].str, str2int[1].base, NULL); ok(result == STATUS_ACCESS_VIOLATION, - "call failed: RtlCharToInteger(\"%s\", %d, NULL) has result %lx", + "call failed: RtlCharToInteger(\"%s\", %d, NULL) has result %lx\n", str2int[1].str, str2int[1].base, result); result = pRtlCharToInteger(str2int[1].str, 20, NULL); ok(result == STATUS_INVALID_PARAMETER, - "call failed: RtlCharToInteger(\"%s\", 20, NULL) has result %lx", + "call failed: RtlCharToInteger(\"%s\", 20, NULL) has result %lx\n", str2int[1].str, result); } @@ -1592,22 +1592,22 @@ } /* if */ } else { ok(result == int2str->result, - "(test %d): RtlIntegerToUnicodeString(%lu, %d, [out]) has result %lx, expected: %lx", + "(test %d): RtlIntegerToUnicodeString(%lu, %d, [out]) has result %lx, expected: %lx\n", test_num, int2str->value, int2str->base, result, int2str->result); if (result == STATUS_SUCCESS) { ok(unicode_string.Buffer[unicode_string.Length/sizeof(WCHAR)] == '\0', - "(test %d): RtlIntegerToUnicodeString(%lu, %d, [out]) string \"%s\" is not NULL terminated", + "(test %d): RtlIntegerToUnicodeString(%lu, %d, [out]) string \"%s\" is not NULL terminated\n", test_num, int2str->value, int2str->base, ansi_str.Buffer); } /* if */ } /* if */ ok(memcmp(unicode_string.Buffer, expected_unicode_string.Buffer, STRI_BUFFER_LENGTH * sizeof(WCHAR)) == 0, - "(test %d): RtlIntegerToUnicodeString(%lu, %d, [out]) assigns string \"%s\", expected: \"%s\"", + "(test %d): RtlIntegerToUnicodeString(%lu, %d, [out]) assigns string \"%s\", expected: \"%s\"\n", test_num, int2str->value, int2str->base, ansi_str.Buffer, expected_ansi_str.Buffer); ok(unicode_string.Length == expected_unicode_string.Length, - "(test %d): RtlIntegerToUnicodeString(%lu, %d, [out]) string has Length %d, expected: %d", + "(test %d): RtlIntegerToUnicodeString(%lu, %d, [out]) string has Length %d, expected: %d\n", test_num, int2str->value, int2str->base, unicode_string.Length, expected_unicode_string.Length); ok(unicode_string.MaximumLength == expected_unicode_string.MaximumLength, - "(test %d): RtlIntegerToUnicodeString(%lu, %d, [out]) string has MaximumLength %d, expected: %d", + "(test %d): RtlIntegerToUnicodeString(%lu, %d, [out]) string has MaximumLength %d, expected: %d\n", test_num, int2str->value, int2str->base, unicode_string.MaximumLength, expected_unicode_string.MaximumLength); pRtlFreeAnsiString(&expected_ansi_str); pRtlFreeAnsiString(&ansi_str); @@ -1632,10 +1632,10 @@ dest_str[STRI_BUFFER_LENGTH] = '\0'; result = pRtlIntegerToChar(int2str->value, int2str->base, int2str->MaximumLength, dest_str); ok(result == int2str->result, - "(test %d): RtlIntegerToChar(%lu, %d, %d, [out]) has result %lx, expected: %lx", + "(test %d): RtlIntegerToChar(%lu, %d, %d, [out]) has result %lx, expected: %lx\n", test_num, int2str->value, int2str->base, int2str->MaximumLength, result, int2str->result); ok(memcmp(dest_str, int2str->Buffer, STRI_BUFFER_LENGTH) == 0, - "(test %d): RtlIntegerToChar(%lu, %d, %d, [out]) assigns string \"%s\", expected: \"%s\"", + "(test %d): RtlIntegerToChar(%lu, %d, %d, [out]) assigns string \"%s\", expected: \"%s\"\n", test_num, int2str->value, int2str->base, int2str->MaximumLength, dest_str, int2str->Buffer); } @@ -1650,22 +1650,22 @@ result = pRtlIntegerToChar(int2str[0].value, 20, int2str[0].MaximumLength, NULL); ok(result == STATUS_INVALID_PARAMETER, - "(test a): RtlIntegerToChar(%lu, %d, %d, NULL) has result %lx, expected: %x", + "(test a): RtlIntegerToChar(%lu, %d, %d, NULL) has result %lx, expected: %x\n", int2str[0].value, 20, int2str[0].MaximumLength, result, STATUS_INVALID_PARAMETER); result = pRtlIntegerToChar(int2str[0].value, 20, 0, NULL); ok(result == STATUS_INVALID_PARAMETER, - "(test b): RtlIntegerToChar(%lu, %d, %d, NULL) has result %lx, expected: %x", + "(test b): RtlIntegerToChar(%lu, %d, %d, NULL) has result %lx, expected: %x\n", int2str[0].value, 20, 0, result, STATUS_INVALID_PARAMETER); result = pRtlIntegerToChar(int2str[0].value, int2str[0].base, 0, NULL); ok(result == STATUS_BUFFER_OVERFLOW, - "(test c): RtlIntegerToChar(%lu, %d, %d, NULL) has result %lx, expected: %x", + "(test c): RtlIntegerToChar(%lu, %d, %d, NULL) has result %lx, expected: %x\n", int2str[0].value, int2str[0].base, 0, result, STATUS_BUFFER_OVERFLOW); result = pRtlIntegerToChar(int2str[0].value, int2str[0].base, int2str[0].MaximumLength, NULL); ok(result == STATUS_ACCESS_VIOLATION, - "(test d): RtlIntegerToChar(%lu, %d, %d, NULL) has result %lx, expected: %x", + "(test d): RtlIntegerToChar(%lu, %d, %d, NULL) has result %lx, expected: %x\n", int2str[0].value, int2str[0].base, int2str[0].MaximumLength, result, STATUS_ACCESS_VIOLATION); } Index: dlls/ntdll/tests/string.c =================================================================== RCS file: /home/cvs/wine/dlls/ntdll/tests/string.c,v retrieving revision 1.4 diff -u -r1.4 string.c --- dlls/ntdll/tests/string.c 4 Oct 2003 03:04:46 -0000 1.4 +++ dlls/ntdll/tests/string.c 17 Oct 2003 13:53:19 -0000 @@ -65,7 +65,7 @@ static void InitFunctionPtrs() { hntdll = LoadLibraryA("ntdll.dll"); - ok(hntdll != 0, "LoadLibrary failed"); + ok(hntdll != 0, "LoadLibrary failed\n"); if (hntdll) { pRtlUnicodeStringToAnsiString = (void *)GetProcAddress(hntdll, "RtlUnicodeStringToAnsiString"); pRtlFreeAnsiString = (void *)GetProcAddress(hntdll, "RtlFreeAnsiString"); @@ -219,10 +219,10 @@ value = ulong2str->value; result = p_itoa(value, dest_str, ulong2str->base); ok(result == dest_str, - "(test %d): _itoa(%d, [out], %d) has result %p, expected: %p", + "(test %d): _itoa(%d, [out], %d) has result %p, expected: %p\n", test_num, value, ulong2str->base, result, dest_str); ok(memcmp(dest_str, ulong2str->Buffer, LARGE_STRI_BUFFER_LENGTH) == 0, - "(test %d): _itoa(%d, [out], %d) assigns string \"%s\", expected: \"%s\"", + "(test %d): _itoa(%d, [out], %d) assigns string \"%s\", expected: \"%s\"\n", test_num, value, ulong2str->base, dest_str, ulong2str->Buffer); } @@ -238,10 +238,10 @@ value = ulong2str->value; result = p_ltoa(ulong2str->value, dest_str, ulong2str->base); ok(result == dest_str, - "(test %d): _ltoa(%ld, [out], %d) has result %p, expected: %p", + "(test %d): _ltoa(%ld, [out], %d) has result %p, expected: %p\n", test_num, value, ulong2str->base, result, dest_str); ok(memcmp(dest_str, ulong2str->Buffer, LARGE_STRI_BUFFER_LENGTH) == 0, - "(test %d): _ltoa(%ld, [out], %d) assigns string \"%s\", expected: \"%s\"", + "(test %d): _ltoa(%ld, [out], %d) assigns string \"%s\", expected: \"%s\"\n", test_num, value, ulong2str->base, dest_str, ulong2str->Buffer); } @@ -257,10 +257,10 @@ value = ulong2str->value; result = p_ultoa(ulong2str->value, dest_str, ulong2str->base); ok(result == dest_str, - "(test %d): _ultoa(%lu, [out], %d) has result %p, expected: %p", + "(test %d): _ultoa(%lu, [out], %d) has result %p, expected: %p\n", test_num, value, ulong2str->base, result, dest_str); ok(memcmp(dest_str, ulong2str->Buffer, LARGE_STRI_BUFFER_LENGTH) == 0, - "(test %d): _ultoa(%lu, [out], %d) assigns string \"%s\", expected: \"%s\"", + "(test %d): _ultoa(%lu, [out], %d) assigns string \"%s\", expected: \"%s\"\n", test_num, value, ulong2str->base, dest_str, ulong2str->Buffer); } @@ -309,10 +309,10 @@ result = p_itow(value, dest_wstr, ulong2str->base); pRtlUnicodeStringToAnsiString(&ansi_str, &unicode_string, 1); ok(result == dest_wstr, - "(test %d): _itow(%d, [out], %d) has result %p, expected: %p", + "(test %d): _itow(%d, [out], %d) has result %p, expected: %p\n", test_num, value, ulong2str->base, result, dest_wstr); ok(memcmp(dest_wstr, expected_wstr, LARGE_STRI_BUFFER_LENGTH * sizeof(WCHAR)) == 0, - "(test %d): _itow(%d, [out], %d) assigns string \"%s\", expected: \"%s\"", + "(test %d): _itow(%d, [out], %d) assigns string \"%s\", expected: \"%s\"\n", test_num, value, ulong2str->base, ansi_str.Buffer, ulong2str->Buffer); pRtlFreeAnsiString(&ansi_str); } @@ -345,10 +345,10 @@ result = p_ltow(value, dest_wstr, ulong2str->base); pRtlUnicodeStringToAnsiString(&ansi_str, &unicode_string, 1); ok(result == dest_wstr, - "(test %d): _ltow(%ld, [out], %d) has result %p, expected: %p", + "(test %d): _ltow(%ld, [out], %d) has result %p, expected: %p\n", test_num, value, ulong2str->base, result, dest_wstr); ok(memcmp(dest_wstr, expected_wstr, LARGE_STRI_BUFFER_LENGTH * sizeof(WCHAR)) == 0, - "(test %d): _ltow(%ld, [out], %d) assigns string \"%s\", expected: \"%s\"", + "(test %d): _ltow(%ld, [out], %d) assigns string \"%s\", expected: \"%s\"\n", test_num, value, ulong2str->base, ansi_str.Buffer, ulong2str->Buffer); pRtlFreeAnsiString(&ansi_str); } @@ -381,10 +381,10 @@ result = p_ultow(value, dest_wstr, ulong2str->base); pRtlUnicodeStringToAnsiString(&ansi_str, &unicode_string, 1); ok(result == dest_wstr, - "(test %d): _ultow(%lu, [out], %d) has result %p, expected: %p", + "(test %d): _ultow(%lu, [out], %d) has result %p, expected: %p\n", test_num, value, ulong2str->base, result, dest_wstr); ok(memcmp(dest_wstr, expected_wstr, LARGE_STRI_BUFFER_LENGTH * sizeof(WCHAR)) == 0, - "(test %d): _ultow(%lu, [out], %d) assigns string \"%s\", expected: \"%s\"", + "(test %d): _ultow(%lu, [out], %d) assigns string \"%s\", expected: \"%s\"\n", test_num, value, ulong2str->base, ansi_str.Buffer, ulong2str->Buffer); pRtlFreeAnsiString(&ansi_str); } @@ -415,7 +415,7 @@ expected_wstr[LARGE_STRI_BUFFER_LENGTH] = '\0'; result = p_itow(ulong2str[0].value, NULL, 10); ok(result == NULL, - "(test a): _itow(%ld, NULL, 10) has result %p, expected: NULL", + "(test a): _itow(%ld, NULL, 10) has result %p, expected: NULL\n", ulong2str[0].value, result); for (pos = 0; pos < LARGE_STRI_BUFFER_LENGTH; pos++) { @@ -424,7 +424,7 @@ expected_wstr[LARGE_STRI_BUFFER_LENGTH] = '\0'; result = p_ltow(ulong2str[0].value, NULL, 10); ok(result == NULL, - "(test b): _ltow(%ld, NULL, 10) has result %p, expected: NULL", + "(test b): _ltow(%ld, NULL, 10) has result %p, expected: NULL\n", ulong2str[0].value, result); for (pos = 0; pos < LARGE_STRI_BUFFER_LENGTH; pos++) { @@ -433,7 +433,7 @@ expected_wstr[LARGE_STRI_BUFFER_LENGTH] = '\0'; result = p_ultow(ulong2str[0].value, NULL, 10); ok(result == NULL, - "(test c): _ultow(%ld, NULL, 10) has result %p, expected: NULL", + "(test c): _ultow(%ld, NULL, 10) has result %p, expected: NULL\n", ulong2str[0].value, result); } @@ -598,19 +598,19 @@ dest_str[LARGE_STRI_BUFFER_LENGTH] = '\0'; result = p_i64toa(ulonglong2str->value, dest_str, ulonglong2str->base); ok(result == dest_str, - "(test %d): _i64toa(%Lu, [out], %d) has result %p, expected: %p", + "(test %d): _i64toa(%Lu, [out], %d) has result %p, expected: %p\n", test_num, ulonglong2str->value, ulonglong2str->base, result, dest_str); if (ulonglong2str->mask & 0x04) { if (memcmp(dest_str, ulonglong2str->Buffer, LARGE_STRI_BUFFER_LENGTH) != 0) { if (memcmp(dest_str, ulonglong2str[1].Buffer, LARGE_STRI_BUFFER_LENGTH) != 0) { ok(memcmp(dest_str, ulonglong2str->Buffer, LARGE_STRI_BUFFER_LENGTH) == 0, - "(test %d): _i64toa(%Lu, [out], %d) assigns string \"%s\", expected: \"%s\"", + "(test %d): _i64toa(%Lu, [out], %d) assigns string \"%s\", expected: \"%s\"\n", test_num, ulonglong2str->value, ulonglong2str->base, dest_str, ulonglong2str->Buffer); } /* if */ } /* if */ } else { ok(memcmp(dest_str, ulonglong2str->Buffer, LARGE_STRI_BUFFER_LENGTH) == 0, - "(test %d): _i64toa(%Lu, [out], %d) assigns string \"%s\", expected: \"%s\"", + "(test %d): _i64toa(%Lu, [out], %d) assigns string \"%s\", expected: \"%s\"\n", test_num, ulonglong2str->value, ulonglong2str->base, dest_str, ulonglong2str->Buffer); } /* if */ } @@ -625,10 +625,10 @@ dest_str[LARGE_STRI_BUFFER_LENGTH] = '\0'; result = p_ui64toa(ulonglong2str->value, dest_str, ulonglong2str->base); ok(result == dest_str, - "(test %d): _ui64toa(%Lu, [out], %d) has result %p, expected: %p", + "(test %d): _ui64toa(%Lu, [out], %d) has result %p, expected: %p\n", test_num, ulonglong2str->value, ulonglong2str->base, result, dest_str); ok(memcmp(dest_str, ulonglong2str->Buffer, LARGE_STRI_BUFFER_LENGTH) == 0, - "(test %d): _ui64toa(%Lu, [out], %d) assigns string \"%s\", expected: \"%s\"", + "(test %d): _ui64toa(%Lu, [out], %d) assigns string \"%s\", expected: \"%s\"\n", test_num, ulonglong2str->value, ulonglong2str->base, dest_str, ulonglong2str->Buffer); } @@ -675,7 +675,7 @@ result = p_i64tow(ulonglong2str->value, dest_wstr, ulonglong2str->base); pRtlUnicodeStringToAnsiString(&ansi_str, &unicode_string, 1); ok(result == dest_wstr, - "(test %d): _i64tow(%llu, [out], %d) has result %p, expected: %p", + "(test %d): _i64tow(%llu, [out], %d) has result %p, expected: %p\n", test_num, ulonglong2str->value, ulonglong2str->base, result, dest_wstr); if (ulonglong2str->mask & 0x04) { if (memcmp(dest_wstr, expected_wstr, LARGE_STRI_BUFFER_LENGTH * sizeof(WCHAR)) != 0) { @@ -685,13 +685,13 @@ expected_wstr[LARGE_STRI_BUFFER_LENGTH] = '\0'; if (memcmp(dest_wstr, expected_wstr, LARGE_STRI_BUFFER_LENGTH * sizeof(WCHAR)) != 0) { ok(memcmp(dest_wstr, expected_wstr, LARGE_STRI_BUFFER_LENGTH * sizeof(WCHAR)) == 0, - "(test %d): _i64tow(%llu, [out], %d) assigns string \"%s\", expected: \"%s\"", + "(test %d): _i64tow(%llu, [out], %d) assigns string \"%s\", expected: \"%s\"\n", test_num, ulonglong2str->value, ulonglong2str->base, ansi_str.Buffer, ulonglong2str->Buffer); } /* if */ } /* if */ } else { ok(memcmp(dest_wstr, expected_wstr, LARGE_STRI_BUFFER_LENGTH * sizeof(WCHAR)) == 0, - "(test %d): _i64tow(%llu, [out], %d) assigns string \"%s\", expected: \"%s\"", + "(test %d): _i64tow(%llu, [out], %d) assigns string \"%s\", expected: \"%s\"\n", test_num, ulonglong2str->value, ulonglong2str->base, ansi_str.Buffer, ulonglong2str->Buffer); } /* if */ pRtlFreeAnsiString(&ansi_str); @@ -723,10 +723,10 @@ result = p_ui64tow(ulonglong2str->value, dest_wstr, ulonglong2str->base); pRtlUnicodeStringToAnsiString(&ansi_str, &unicode_string, 1); ok(result == dest_wstr, - "(test %d): _ui64tow(%llu, [out], %d) has result %p, expected: %p", + "(test %d): _ui64tow(%llu, [out], %d) has result %p, expected: %p\n", test_num, ulonglong2str->value, ulonglong2str->base, result, dest_wstr); ok(memcmp(dest_wstr, expected_wstr, LARGE_STRI_BUFFER_LENGTH * sizeof(WCHAR)) == 0, - "(test %d): _ui64tow(%llu, [out], %d) assigns string \"%s\", expected: \"%s\"", + "(test %d): _ui64tow(%llu, [out], %d) assigns string \"%s\", expected: \"%s\"\n", test_num, ulonglong2str->value, ulonglong2str->base, ansi_str.Buffer, ulonglong2str->Buffer); pRtlFreeAnsiString(&ansi_str); } @@ -756,7 +756,7 @@ expected_wstr[LARGE_STRI_BUFFER_LENGTH] = '\0'; result = p_i64tow(ulong2str[0].value, NULL, 10); ok(result == NULL, - "(test d): _i64tow(%llu, NULL, 10) has result %p, expected: NULL", + "(test d): _i64tow(%llu, NULL, 10) has result %p, expected: NULL\n", ulonglong2str[0].value, result); if (p_ui64tow) { @@ -766,7 +766,7 @@ expected_wstr[LARGE_STRI_BUFFER_LENGTH] = '\0'; result = p_ui64tow(ulong2str[0].value, NULL, 10); ok(result == NULL, - "(test e): _ui64tow(%llu, NULL, 10) has result %p, expected: NULL", + "(test e): _ui64tow(%llu, NULL, 10) has result %p, expected: NULL\n", ulonglong2str[0].value, result); } /* if */ } @@ -893,7 +893,7 @@ pRtlCreateUnicodeStringFromAsciiz(&uni, str2long[test_num].str); result = p_wtoi(uni.Buffer); ok(result == str2long[test_num].value, - "(test %d): call failed: _wtoi(\"%s\") has result %d, expected: %ld", + "(test %d): call failed: _wtoi(\"%s\") has result %d, expected: %ld\n", test_num, str2long[test_num].str, result, str2long[test_num].value); pRtlFreeUnicodeString(&uni); } /* for */ @@ -910,7 +910,7 @@ pRtlCreateUnicodeStringFromAsciiz(&uni, str2long[test_num].str); result = p_wtol(uni.Buffer); ok(result == str2long[test_num].value, - "(test %d): call failed: _wtol(\"%s\") has result %ld, expected: %ld", + "(test %d): call failed: _wtol(\"%s\") has result %ld, expected: %ld\n", test_num, str2long[test_num].str, result, str2long[test_num].value); pRtlFreeUnicodeString(&uni); } /* for */ @@ -1048,7 +1048,7 @@ for (test_num = 0; test_num < NB_STR2LONGLONG; test_num++) { result = p_atoi64(str2longlong[test_num].str); ok(result == str2longlong[test_num].value, - "(test %d): call failed: _atoi64(\"%s\") has result %lld, expected: %lld", + "(test %d): call failed: _atoi64(\"%s\") has result %lld, expected: %lld\n", test_num, str2longlong[test_num].str, result, str2longlong[test_num].value); } /* for */ } @@ -1064,7 +1064,7 @@ pRtlCreateUnicodeStringFromAsciiz(&uni, str2longlong[test_num].str); result = p_wtoi64(uni.Buffer); ok(result == str2longlong[test_num].value, - "(test %d): call failed: _wtoi64(\"%s\") has result %lld, expected: %lld", + "(test %d): call failed: _wtoi64(\"%s\") has result %lld, expected: %lld\n", test_num, str2longlong[test_num].str, result, str2longlong[test_num].value); pRtlFreeUnicodeString(&uni); } /* for */ -- Francois Gouget fgouget@free.fr http://fgouget.free.fr/ Linux: It is now safe to turn on your computer.