Add trailing '\n's to ok() calls (generated files)

Francois Gouget fgouget at free.fr
Thu Jan 22 07:28:36 CST 2004


Alexandre, this patch updates the generated test files to add a '\n' to
ok() calls and tests whether _MSC_VER is defined.

An alternative to this patch is to re-run ./tools/winapi/winapi_tests
but this will also add/remove some checks which will result in more
changes.

So if you apply the patch a minimum of changes will be done, and if you
re-run winapi_tests, more changes will be done but at least the
generated files will deserve their name again. I don't have a big
preference either way so the choice is yours.


Changelog:

 * dlls/gdi/tests/generated.c,
   dlls/kernel/tests/generated.c,
   dlls/ntdll/tests/generated.c,
   dlls/shell32/tests/generated.c,
   dlls/shlwapi/tests/generated.c,
   dlls/urlmon/tests/generated.c,
   dlls/user/tests/generated.c,
   dlls/wininet/tests/generated.c

   Add trailing '\n's to ok() calls.
   Check whether _MSC_VER is defined


Index: dlls/gdi/tests/generated.c
===================================================================
RCS file: /home/cvs/wine/dlls/gdi/tests/generated.c,v
retrieving revision 1.8
diff -u -r1.8 generated.c
--- dlls/gdi/tests/generated.c	24 Oct 2003 04:45:35 -0000	1.8
+++ dlls/gdi/tests/generated.c	22 Jan 2004 00:10:17 -0000
@@ -71,7 +71,7 @@

 #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(" #type ") == %d (expected " #align ")\n", _TYPE_ALIGNMENT(type))
 #else
 # define TEST__TYPE_ALIGNMENT(type, align) do { } while (0)
 #endif
Index: dlls/kernel/tests/generated.c
===================================================================
RCS file: /home/cvs/wine/dlls/kernel/tests/generated.c,v
retrieving revision 1.8
diff -u -r1.8 generated.c
--- dlls/kernel/tests/generated.c	12 Nov 2002 01:13:10 -0000	1.8
+++ dlls/kernel/tests/generated.c	22 Jan 2004 13:03:32 -0000
@@ -27,7 +27,7 @@
  * Windows API extension
  */

-#if (_MSC_VER >= 1300) && defined(__cplusplus)
+#if defined(_MSC_VER) && (_MSC_VER >= 1300) && defined(__cplusplus)
 # define FIELD_ALIGNMENT(type, field) __alignof(((type*)0)->field)
 #elif defined(__GNUC__)
 # define FIELD_ALIGNMENT(type, field) __alignof__(((type*)0)->field)
@@ -35,7 +35,7 @@
 /* FIXME: Not sure if is possible to do without compiler extension */
 #endif

-#if (_MSC_VER >= 1300) && defined(__cplusplus)
+#if defined(_MSC_VER) && (_MSC_VER >= 1300) && defined(__cplusplus)
 # define _TYPE_ALIGNMENT(type) __alignof(type)
 #elif defined(__GNUC__)
 # define _TYPE_ALIGNMENT(type) __alignof__(type)
@@ -58,7 +58,7 @@
 #ifdef FIELD_ALIGNMENT
 # define TEST_FIELD_ALIGNMENT(type, field, align) \
    ok(FIELD_ALIGNMENT(type, field) == align, \
-       "FIELD_ALIGNMENT(" #type ", " #field ") == %d (expected " #align ")", \
+       "FIELD_ALIGNMENT(" #type ", " #field ") == %d (expected " #align ")\n", \
            FIELD_ALIGNMENT(type, field))
 #else
 # define TEST_FIELD_ALIGNMENT(type, field, align) do { } while (0)
@@ -66,25 +66,25 @@

 #define TEST_FIELD_OFFSET(type, field, offset) \
     ok(FIELD_OFFSET(type, field) == offset, \
-        "FIELD_OFFSET(" #type ", " #field ") == %ld (expected " #offset ")", \
+        "FIELD_OFFSET(" #type ", " #field ") == %ld (expected " #offset ")\n", \
              FIELD_OFFSET(type, field))

 #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(" #type ") == %d (expected " #align ")\n", _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(" #type ") == %d (expected " #align ")\n", 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(" #type ") == %d (expected " #size ")\n", sizeof(type))

 /***********************************************************************
  * Test macros
@@ -104,10 +104,10 @@
     TEST_TYPE_SIZE(*(type)0, size)

 #define TEST_TYPE_SIGNED(type) \
-    ok((type) -1 < 0, "(" #type ") -1 < 0");
+    ok((type) -1 < 0, "(" #type ") -1 < 0\n");

 #define TEST_TYPE_UNSIGNED(type) \
-     ok((type) -1 > 0, "(" #type ") -1 > 0");
+     ok((type) -1 > 0, "(" #type ") -1 > 0\n");

 static void test_pack_BY_HANDLE_FILE_INFORMATION(void)
 {
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	22 Jan 2004 13:04:39 -0000
@@ -28,7 +28,7 @@
  * Windows API extension
  */

-#if (_MSC_VER >= 1300) && defined(__cplusplus)
+#if defined(_MSC_VER) && (_MSC_VER >= 1300) && defined(__cplusplus)
 # define FIELD_ALIGNMENT(type, field) __alignof(((type*)0)->field)
 #elif defined(__GNUC__)
 # define FIELD_ALIGNMENT(type, field) __alignof__(((type*)0)->field)
@@ -36,7 +36,7 @@
 /* FIXME: Not sure if is possible to do without compiler extension */
 #endif

-#if (_MSC_VER >= 1300) && defined(__cplusplus)
+#if defined(_MSC_VER) && (_MSC_VER >= 1300) && defined(__cplusplus)
 # define _TYPE_ALIGNMENT(type) __alignof(type)
 #elif defined(__GNUC__)
 # define _TYPE_ALIGNMENT(type) __alignof__(type)
@@ -59,7 +59,7 @@
 #ifdef FIELD_ALIGNMENT
 # define TEST_FIELD_ALIGNMENT(type, field, align) \
    ok(FIELD_ALIGNMENT(type, field) == align, \
-       "FIELD_ALIGNMENT(" #type ", " #field ") == %d (expected " #align ")", \
+       "FIELD_ALIGNMENT(" #type ", " #field ") == %d (expected " #align ")\n", \
            FIELD_ALIGNMENT(type, field))
 #else
 # define TEST_FIELD_ALIGNMENT(type, field, align) do { } while (0)
@@ -67,25 +67,25 @@

 #define TEST_FIELD_OFFSET(type, field, offset) \
     ok(FIELD_OFFSET(type, field) == offset, \
-        "FIELD_OFFSET(" #type ", " #field ") == %ld (expected " #offset ")", \
+        "FIELD_OFFSET(" #type ", " #field ") == %ld (expected " #offset ")\n", \
              FIELD_OFFSET(type, field))

 #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(" #type ") == %d (expected " #align ")\n", _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(" #type ") == %d (expected " #align ")\n", 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(" #type ") == %d (expected " #size ")\n", 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, "(" #type ") -1 < 0\n");

 #define TEST_TYPE_UNSIGNED(type) \
-     ok((type) -1 > 0, "(" #type ") -1 > 0");
+     ok((type) -1 > 0, "(" #type ") -1 > 0\n");

 static void test_pack_DWORD32(void)
 {
Index: dlls/shell32/tests/generated.c
===================================================================
RCS file: /home/cvs/wine/dlls/shell32/tests/generated.c,v
retrieving revision 1.2
diff -u -r1.2 generated.c
--- dlls/shell32/tests/generated.c	5 Sep 2003 23:08:30 -0000	1.2
+++ dlls/shell32/tests/generated.c	22 Jan 2004 13:04:40 -0000
@@ -35,7 +35,7 @@
  * Windows API extension
  */

-#if (_MSC_VER >= 1300) && defined(__cplusplus)
+#if defined(_MSC_VER) && (_MSC_VER >= 1300) && defined(__cplusplus)
 # define FIELD_ALIGNMENT(type, field) __alignof(((type*)0)->field)
 #elif defined(__GNUC__)
 # define FIELD_ALIGNMENT(type, field) __alignof__(((type*)0)->field)
@@ -43,7 +43,7 @@
 /* FIXME: Not sure if is possible to do without compiler extension */
 #endif

-#if (_MSC_VER >= 1300) && defined(__cplusplus)
+#if defined(_MSC_VER) && (_MSC_VER >= 1300) && defined(__cplusplus)
 # define _TYPE_ALIGNMENT(type) __alignof(type)
 #elif defined(__GNUC__)
 # define _TYPE_ALIGNMENT(type) __alignof__(type)
@@ -66,7 +66,7 @@
 #ifdef FIELD_ALIGNMENT
 # define TEST_FIELD_ALIGNMENT(type, field, align) \
    ok(FIELD_ALIGNMENT(type, field) == align, \
-       "FIELD_ALIGNMENT(" #type ", " #field ") == %d (expected " #align ")", \
+       "FIELD_ALIGNMENT(" #type ", " #field ") == %d (expected " #align ")\n", \
            FIELD_ALIGNMENT(type, field))
 #else
 # define TEST_FIELD_ALIGNMENT(type, field, align) do { } while (0)
@@ -74,25 +74,25 @@

 #define TEST_FIELD_OFFSET(type, field, offset) \
     ok(FIELD_OFFSET(type, field) == offset, \
-        "FIELD_OFFSET(" #type ", " #field ") == %ld (expected " #offset ")", \
+        "FIELD_OFFSET(" #type ", " #field ") == %ld (expected " #offset ")\n", \
              FIELD_OFFSET(type, field))

 #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(" #type ") == %d (expected " #align ")\n", _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(" #type ") == %d (expected " #align ")\n", 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(" #type ") == %d (expected " #size ")\n", sizeof(type))

 /***********************************************************************
  * Test macros
@@ -112,10 +112,10 @@
     TEST_TYPE_SIZE(*(type)0, size)

 #define TEST_TYPE_SIGNED(type) \
-    ok((type) -1 < 0, "(" #type ") -1 < 0");
+    ok((type) -1 < 0, "(" #type ") -1 < 0\n");

 #define TEST_TYPE_UNSIGNED(type) \
-     ok((type) -1 > 0, "(" #type ") -1 > 0");
+     ok((type) -1 > 0, "(" #type ") -1 > 0\n");

 static void test_pack_APPBARDATA(void)
 {
Index: dlls/shlwapi/tests/generated.c
===================================================================
RCS file: /home/cvs/wine/dlls/shlwapi/tests/generated.c,v
retrieving revision 1.3
diff -u -r1.3 generated.c
--- dlls/shlwapi/tests/generated.c	24 Oct 2003 04:45:35 -0000	1.3
+++ dlls/shlwapi/tests/generated.c	22 Jan 2004 00:10:19 -0000
@@ -76,7 +76,7 @@

 #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(" #type ") == %d (expected " #align ")\n", _TYPE_ALIGNMENT(type))
 #else
 # define TEST__TYPE_ALIGNMENT(type, align) do { } while (0)
 #endif
Index: dlls/urlmon/tests/generated.c
===================================================================
RCS file: /home/cvs/wine/dlls/urlmon/tests/generated.c,v
retrieving revision 1.3
diff -u -r1.3 generated.c
--- dlls/urlmon/tests/generated.c	24 Oct 2003 04:45:35 -0000	1.3
+++ dlls/urlmon/tests/generated.c	22 Jan 2004 00:10:19 -0000
@@ -74,7 +74,7 @@

 #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(" #type ") == %d (expected " #align ")\n", _TYPE_ALIGNMENT(type))
 #else
 # define TEST__TYPE_ALIGNMENT(type, align) do { } while (0)
 #endif
Index: dlls/user/tests/generated.c
===================================================================
RCS file: /home/cvs/wine/dlls/user/tests/generated.c,v
retrieving revision 1.9
diff -u -r1.9 generated.c
--- dlls/user/tests/generated.c	24 Oct 2003 04:45:35 -0000	1.9
+++ dlls/user/tests/generated.c	22 Jan 2004 00:10:19 -0000
@@ -71,7 +71,7 @@

 #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(" #type ") == %d (expected " #align ")\n", _TYPE_ALIGNMENT(type))
 #else
 # define TEST__TYPE_ALIGNMENT(type, align) do { } while (0)
 #endif
Index: dlls/wininet/tests/generated.c
===================================================================
RCS file: /home/cvs/wine/dlls/wininet/tests/generated.c,v
retrieving revision 1.2
diff -u -r1.2 generated.c
--- dlls/wininet/tests/generated.c	24 Oct 2003 04:45:35 -0000	1.2
+++ dlls/wininet/tests/generated.c	22 Jan 2004 00:10:19 -0000
@@ -74,7 +74,7 @@

 #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(" #type ") == %d (expected " #align ")\n", _TYPE_ALIGNMENT(type))
 #else
 # define TEST__TYPE_ALIGNMENT(type, align) do { } while (0)
 #endif




-- 
Francois Gouget         fgouget at free.fr        http://fgouget.free.fr/
        War doesn't determine who's right.  War determines who's left.



More information about the wine-patches mailing list