Re: [1/2] shell32/tests: Program Manager DDE Conformance Tests
Mike wrote:
Conformance Tests to test the Program Manager DDE. Currently stubbed in Wine, bug 9159. Has been tested on Win XP SP2 and Win 98 SE.
--- dlls/shell32/tests/Makefile.in | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/dlls/shell32/tests/Makefile.in b/dlls/shell32/tests/Makefile.in index dd0587c..0cad860 100644 --- a/dlls/shell32/tests/Makefile.in +++ b/dlls/shell32/tests/Makefile.in @@ -9,6 +9,7 @@ CTESTS = \ appbar.c \ autocomplete.c \ generated.c \ + progman_dde.c \ shelllink.c \ shellpath.c \ shfldr_special.c \ --
This can't work on it's own and should be merged with your next patch.
+HDDEDATA CALLBACK DdeCallback(UINT type, + UINT format, + HCONV hConv, + HSZ hsz1, + HSZ hsz2, + HDDEDATA hDDEData, + ULONG_PTR data1, + ULONG_PTR data2) +{ + trace("Callback: type=%i, format=%i\n", type, format); + return NULL; +} + Tabs should always be set to 8 spaces, not 4. For Wine please use 4-space indentations, no tabs please.
+int IsWin9x(void) +{ + return (GetVersion() & 0x80000000); +} Don't add this sort of functions. All tests should work on all Windows versions. Or you should detect differences by other means.
+/* Transfer DMLERR's into text readable strings for Error Messages */ +const char * GetStringFromError(UINT err) +{ + const char * retstr; + switch (err) + { + case DMLERR_NO_ERROR: + retstr = "DMLERR_NO_ERROR"; + break; + case DMLERR_ADVACKTIMEOUT: + retstr = "DMLERR_ADVACKTIMEOUT"; + break; + case DMLERR_BUSY: Use ## macro for this instead. See examples throughout the code-base.
+ window = FindWindow(NULL, winName); + SendMessage(window, WM_SYSCOMMAND, SC_CLOSE, 0); You should explicitly specify A or W variant of the function in tests.
+ path = (char *) malloc(MAX_PATH); Don't use malloc in tests, use HeapAllock instead.
+ DdeExecuteCommand(instance, hConv, (char *) "[InvalidCommand()]", &hData, &error, DDE_TEST_MISC|testnum++); This is wrong - don't cast away const pointers. If you getting warnings that means you doing something wrong.
Vitaliy.
participants (1)
-
Vitaliy Margolen