ntdsapi/tests: Enable compilation with long types.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
a5286b87b8
commit
a43f500643
|
@ -1,4 +1,3 @@
|
||||||
EXTRADEFS = -DWINE_NO_LONG_TYPES
|
|
||||||
TESTDLL = ntdsapi.dll
|
TESTDLL = ntdsapi.dll
|
||||||
IMPORTS = ntdsapi
|
IMPORTS = ntdsapi
|
||||||
|
|
||||||
|
|
|
@ -47,41 +47,41 @@ static void test_DsMakeSpn(void)
|
||||||
|
|
||||||
spn_length = ARRAY_SIZE(spn);
|
spn_length = ARRAY_SIZE(spn);
|
||||||
ret = DsMakeSpnW(NULL, NULL, NULL, 0, NULL, &spn_length, spn);
|
ret = DsMakeSpnW(NULL, NULL, NULL, 0, NULL, &spn_length, spn);
|
||||||
ok(ret == ERROR_INVALID_PARAMETER, "DsMakeSpnW should have failed with ERROR_INVALID_PARAMETER instead of %d\n", ret);
|
ok(ret == ERROR_INVALID_PARAMETER, "DsMakeSpnW should have failed with ERROR_INVALID_PARAMETER instead of %ld\n", ret);
|
||||||
|
|
||||||
spn_length = ARRAY_SIZE(spn);
|
spn_length = ARRAY_SIZE(spn);
|
||||||
ret = DsMakeSpnW(NULL, wszServiceHost, NULL, 0, NULL, &spn_length, spn);
|
ret = DsMakeSpnW(NULL, wszServiceHost, NULL, 0, NULL, &spn_length, spn);
|
||||||
ok(ret == ERROR_INVALID_PARAMETER, "DsMakeSpnW should have failed with ERROR_INVALID_PARAMETER instead of %d\n", ret);
|
ok(ret == ERROR_INVALID_PARAMETER, "DsMakeSpnW should have failed with ERROR_INVALID_PARAMETER instead of %ld\n", ret);
|
||||||
|
|
||||||
spn_length = ARRAY_SIZE(spn);
|
spn_length = ARRAY_SIZE(spn);
|
||||||
ret = DsMakeSpnW(wszServiceClass, wszServiceHost, NULL, 0, NULL, &spn_length, spn);
|
ret = DsMakeSpnW(wszServiceClass, wszServiceHost, NULL, 0, NULL, &spn_length, spn);
|
||||||
ok(ret == ERROR_SUCCESS, "DsMakeSpnW should have succeeded instead of failing with %d\n", ret);
|
ok(ret == ERROR_SUCCESS, "DsMakeSpnW should have succeeded instead of failing with %ld\n", ret);
|
||||||
ok(!lstrcmpW(spn, wszSpn1), "DsMakeSpnW returned unexpected SPN %s\n", wine_dbgstr_w(spn));
|
ok(!lstrcmpW(spn, wszSpn1), "DsMakeSpnW returned unexpected SPN %s\n", wine_dbgstr_w(spn));
|
||||||
ok(spn_length == lstrlenW(wszSpn1) + 1, "DsMakeSpnW should have returned spn_length of %d instead of %d\n", lstrlenW(wszSpn1) + 1, spn_length);
|
ok(spn_length == lstrlenW(wszSpn1) + 1, "DsMakeSpnW should have returned spn_length of %d instead of %ld\n", lstrlenW(wszSpn1) + 1, spn_length);
|
||||||
|
|
||||||
spn_length = ARRAY_SIZE(spn);
|
spn_length = ARRAY_SIZE(spn);
|
||||||
ret = DsMakeSpnW(wszServiceClass, wszServiceHost, wszInstanceName, 0, NULL, &spn_length, spn);
|
ret = DsMakeSpnW(wszServiceClass, wszServiceHost, wszInstanceName, 0, NULL, &spn_length, spn);
|
||||||
ok(ret == ERROR_SUCCESS, "DsMakeSpnW should have succeeded instead of failing with %d\n", ret);
|
ok(ret == ERROR_SUCCESS, "DsMakeSpnW should have succeeded instead of failing with %ld\n", ret);
|
||||||
ok(!lstrcmpW(spn, wszSpn2), "DsMakeSpnW returned unexpected SPN %s\n", wine_dbgstr_w(spn));
|
ok(!lstrcmpW(spn, wszSpn2), "DsMakeSpnW returned unexpected SPN %s\n", wine_dbgstr_w(spn));
|
||||||
ok(spn_length == lstrlenW(wszSpn2) + 1, "DsMakeSpnW should have returned spn_length of %d instead of %d\n", lstrlenW(wszSpn2) + 1, spn_length);
|
ok(spn_length == lstrlenW(wszSpn2) + 1, "DsMakeSpnW should have returned spn_length of %d instead of %ld\n", lstrlenW(wszSpn2) + 1, spn_length);
|
||||||
|
|
||||||
spn_length = ARRAY_SIZE(spn);
|
spn_length = ARRAY_SIZE(spn);
|
||||||
ret = DsMakeSpnW(wszServiceClass, wszServiceHost, wszInstanceName, 555, NULL, &spn_length, spn);
|
ret = DsMakeSpnW(wszServiceClass, wszServiceHost, wszInstanceName, 555, NULL, &spn_length, spn);
|
||||||
ok(ret == ERROR_SUCCESS, "DsMakeSpnW should have succeeded instead of failing with %d\n", ret);
|
ok(ret == ERROR_SUCCESS, "DsMakeSpnW should have succeeded instead of failing with %ld\n", ret);
|
||||||
ok(!lstrcmpW(spn, wszSpn3), "DsMakeSpnW returned unexpected SPN %s\n", wine_dbgstr_w(spn));
|
ok(!lstrcmpW(spn, wszSpn3), "DsMakeSpnW returned unexpected SPN %s\n", wine_dbgstr_w(spn));
|
||||||
ok(spn_length == lstrlenW(wszSpn3) + 1, "DsMakeSpnW should have returned spn_length of %d instead of %d\n", lstrlenW(wszSpn3) + 1, spn_length);
|
ok(spn_length == lstrlenW(wszSpn3) + 1, "DsMakeSpnW should have returned spn_length of %d instead of %ld\n", lstrlenW(wszSpn3) + 1, spn_length);
|
||||||
|
|
||||||
spn_length = ARRAY_SIZE(spn);
|
spn_length = ARRAY_SIZE(spn);
|
||||||
ret = DsMakeSpnW(wszServiceClass, wszServiceHost, wszInstanceName, 555, wszReferrer, &spn_length, spn);
|
ret = DsMakeSpnW(wszServiceClass, wszServiceHost, wszInstanceName, 555, wszReferrer, &spn_length, spn);
|
||||||
ok(ret == ERROR_SUCCESS, "DsMakeSpnW should have succeeded instead of failing with %d\n", ret);
|
ok(ret == ERROR_SUCCESS, "DsMakeSpnW should have succeeded instead of failing with %ld\n", ret);
|
||||||
ok(!lstrcmpW(spn, wszSpn4), "DsMakeSpnW returned unexpected SPN %s\n", wine_dbgstr_w(spn));
|
ok(!lstrcmpW(spn, wszSpn4), "DsMakeSpnW returned unexpected SPN %s\n", wine_dbgstr_w(spn));
|
||||||
ok(spn_length == lstrlenW(wszSpn4) + 1, "DsMakeSpnW should have returned spn_length of %d instead of %d\n", lstrlenW(wszSpn4) + 1, spn_length);
|
ok(spn_length == lstrlenW(wszSpn4) + 1, "DsMakeSpnW should have returned spn_length of %d instead of %ld\n", lstrlenW(wszSpn4) + 1, spn_length);
|
||||||
|
|
||||||
spn_length = ARRAY_SIZE(spn);
|
spn_length = ARRAY_SIZE(spn);
|
||||||
ret = DsMakeSpnW(wszServiceClass, wszServiceHost, NULL, 555, wszReferrer, &spn_length, spn);
|
ret = DsMakeSpnW(wszServiceClass, wszServiceHost, NULL, 555, wszReferrer, &spn_length, spn);
|
||||||
ok(ret == ERROR_SUCCESS, "DsMakeSpnW should have succeeded instead of failing with %d\n", ret);
|
ok(ret == ERROR_SUCCESS, "DsMakeSpnW should have succeeded instead of failing with %ld\n", ret);
|
||||||
ok(!lstrcmpW(spn, wszSpn5), "DsMakeSpnW returned unexpected SPN %s\n", wine_dbgstr_w(spn));
|
ok(!lstrcmpW(spn, wszSpn5), "DsMakeSpnW returned unexpected SPN %s\n", wine_dbgstr_w(spn));
|
||||||
ok(spn_length == lstrlenW(wszSpn5) + 1, "DsMakeSpnW should have returned spn_length of %d instead of %d\n", lstrlenW(wszSpn5) + 1, spn_length);
|
ok(spn_length == lstrlenW(wszSpn5) + 1, "DsMakeSpnW should have returned spn_length of %d instead of %ld\n", lstrlenW(wszSpn5) + 1, spn_length);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_DsClientMakeSpnForTargetServer(void)
|
static void test_DsClientMakeSpnForTargetServer(void)
|
||||||
|
@ -93,24 +93,24 @@ static void test_DsClientMakeSpnForTargetServer(void)
|
||||||
WCHAR buf[256];
|
WCHAR buf[256];
|
||||||
|
|
||||||
ret = DsClientMakeSpnForTargetServerW( NULL, NULL, NULL, NULL );
|
ret = DsClientMakeSpnForTargetServerW( NULL, NULL, NULL, NULL );
|
||||||
ok( ret == ERROR_INVALID_PARAMETER, "got %u\n", ret );
|
ok( ret == ERROR_INVALID_PARAMETER, "got %lu\n", ret );
|
||||||
|
|
||||||
ret = DsClientMakeSpnForTargetServerW( classW, NULL, NULL, NULL );
|
ret = DsClientMakeSpnForTargetServerW( classW, NULL, NULL, NULL );
|
||||||
ok( ret == ERROR_INVALID_PARAMETER, "got %u\n", ret );
|
ok( ret == ERROR_INVALID_PARAMETER, "got %lu\n", ret );
|
||||||
|
|
||||||
ret = DsClientMakeSpnForTargetServerW( classW, hostW, NULL, NULL );
|
ret = DsClientMakeSpnForTargetServerW( classW, hostW, NULL, NULL );
|
||||||
ok( ret == ERROR_INVALID_PARAMETER, "got %u\n", ret );
|
ok( ret == ERROR_INVALID_PARAMETER, "got %lu\n", ret );
|
||||||
|
|
||||||
len = 0;
|
len = 0;
|
||||||
ret = DsClientMakeSpnForTargetServerW( classW, hostW, &len, NULL );
|
ret = DsClientMakeSpnForTargetServerW( classW, hostW, &len, NULL );
|
||||||
ok( ret == ERROR_BUFFER_OVERFLOW, "got %u\n", ret );
|
ok( ret == ERROR_BUFFER_OVERFLOW, "got %lu\n", ret );
|
||||||
ok( len == lstrlenW(resultW) + 1, "got %u\n", len );
|
ok( len == lstrlenW(resultW) + 1, "got %lu\n", len );
|
||||||
|
|
||||||
len = ARRAY_SIZE(buf);
|
len = ARRAY_SIZE(buf);
|
||||||
buf[0] = 0;
|
buf[0] = 0;
|
||||||
ret = DsClientMakeSpnForTargetServerW( classW, hostW, &len, buf );
|
ret = DsClientMakeSpnForTargetServerW( classW, hostW, &len, buf );
|
||||||
ok( ret == ERROR_SUCCESS, "got %u\n", ret );
|
ok( ret == ERROR_SUCCESS, "got %lu\n", ret );
|
||||||
ok( len == lstrlenW(resultW) + 1, "got %u\n", len );
|
ok( len == lstrlenW(resultW) + 1, "got %lu\n", len );
|
||||||
ok( !lstrcmpW( buf, resultW ), "wrong data\n" );
|
ok( !lstrcmpW( buf, resultW ), "wrong data\n" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue