Add trailing '\n's to ok() calls (ntdll 1)
Francois Gouget
fgouget at free.fr
Fri Feb 6 06:54:10 CST 2004
Changelog:
* dlls/ntdll/tests/env.c
dlls/ntdll/tests/error.c
dlls/ntdll/tests/large_int.c
dlls/ntdll/tests/path.c
Add trailing '\n's to ok() calls.
Index: dlls/ntdll/tests/env.c
===================================================================
RCS file: /home/cvs/wine/dlls/ntdll/tests/env.c,v
retrieving revision 1.6
diff -u -r1.6 env.c
--- dlls/ntdll/tests/env.c 13 Jan 2004 04:57:57 -0000 1.6
+++ dlls/ntdll/tests/env.c 6 Feb 2004 11:57:21 -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 24 Jan 2004 20:03:41 -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/large_int.c
===================================================================
RCS file: /home/cvs/wine/dlls/ntdll/tests/large_int.c,v
retrieving revision 1.5
diff -u -r1.5 large_int.c
--- dlls/ntdll/tests/large_int.c 15 Dec 2003 20:18:50 -0000 1.5
+++ dlls/ntdll/tests/large_int.c 24 Jan 2004 20:03:41 -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.5
diff -u -r1.5 path.c
--- dlls/ntdll/tests/path.c 15 Dec 2003 20:18:50 -0000 1.5
+++ dlls/ntdll/tests/path.c 24 Jan 2004 20:03:41 -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 );
}
}
}
--
Francois Gouget fgouget at free.fr http://fgouget.free.fr/
tcA thgirypoC muinelliM latigiD eht detaloiv tsuj evah uoY
More information about the wine-patches
mailing list