ADVAPI32: Start test for service tests

James Hawkins truiken at gmail.com
Sun May 20 21:49:31 CDT 2007


On 5/20/07, Rolf Kalbermatter <r.kalbermatter at hccnet.nl> wrote:
> Changelog
>   dlls/advapi32/tests/Makefile.in
>   dlls/advapi32/tests/service.c
>     Start test for service tests
> License: X11/LGPL
>
> This test will crash without the previous patch
> "Return error on NULL service name to GetServiceDisplayNameA/W"
>
> Rolf Kalbermatter
>

+    ok(size <= 1, "size should be <= 1 was %d!", size);

This is a bad test.  According to msdn, GetServiceDisplayName does not
modify lpcchBuffer on error, so size should be exactly 0.

+static BOOL test_service_info(SC_HANDLE hscm)

test functions are void, not BOOL.  You're never going to do anything
but return, and there's no value to check by the caller.

+    ok(size, "size should be returned!");

And what is the size?  Tests are supposed to be exact.  If our
implementation is incorrect, and we return size as 39491, that's
certainly not correct, but this test won't fail when it should.

+static BOOL test_service_enum(SC_HANDLE hscm)
+{
+    return 0;
+}

Please don't add dead code.

-- 
James Hawkins



More information about the wine-devel mailing list