wined3d: Pass a wined3d_device_context to wined3d_cs_emit_blt_sub_resource().
[wine/zf.git] / dlls / slc / tests / slc.c
blobfc0b1c84ad79c8bae2e6a0f157a4d7fa876b5fd8
1 /*
2 * Copyright 2014 Sebastian Lackner
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #include <stdarg.h>
21 #include "windef.h"
22 #include "winbase.h"
23 #include "winerror.h"
25 #include "slpublic.h"
26 #include "slerror.h"
28 #include <wine/test.h>
30 static void test_SLGetWindowsInformationDWORD(void)
32 DWORD value;
33 HRESULT res;
35 res = SLGetWindowsInformationDWORD(L"Nonexistent-License-Value", NULL);
36 ok(res == E_INVALIDARG, "expected E_INVALIDARG, got %08x\n", res);
38 res = SLGetWindowsInformationDWORD(NULL, &value);
39 ok(res == E_INVALIDARG, "expected E_INVALIDARG, got %08x\n", res);
41 value = 0xdeadbeef;
42 res = SLGetWindowsInformationDWORD(L"Nonexistent-License-Value", &value);
43 ok(res == SL_E_VALUE_NOT_FOUND, "expected SL_E_VALUE_NOT_FOUND, got %08x\n", res);
44 ok(value == 0xdeadbeef, "expected value = 0xdeadbeef, got %u\n", value);
46 value = 0xdeadbeef;
47 res = SLGetWindowsInformationDWORD(L"", &value);
48 ok(res == SL_E_RIGHT_NOT_GRANTED || broken(res == 0xd000000d) /* Win 8 */,
49 "expected SL_E_RIGHT_NOT_GRANTED, got %08x\n", res);
50 ok(value == 0xdeadbeef, "expected value = 0xdeadbeef, got %u\n", value);
52 value = 0xdeadbeef;
53 res = SLGetWindowsInformationDWORD(L"Kernel-MUI-Language-Allowed", &value);
54 ok(res == SL_E_DATATYPE_MISMATCHED, "expected SL_E_DATATYPE_MISMATCHED, got %08x\n", res);
55 ok(value == 0xdeadbeef, "expected value = 0xdeadbeef, got %u\n", value);
57 value = 0xdeadbeef;
58 res = SLGetWindowsInformationDWORD(L"Kernel-MUI-Number-Allowed", &value);
59 ok(res == S_OK, "expected S_OK, got %u\n", res);
60 ok(value != 0xdeadbeef, "expected value != 0xdeadbeef\n");
64 START_TEST(slc)
66 test_SLGetWindowsInformationDWORD();