IACLCustomMRU.cpp (828a65f4) IACLCustomMRU.cpp (d82185f1)
1/*
2 * PROJECT: ReactOS api tests
3 * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
4 * PURPOSE: Test for IACLCustomMRU objects
5 * COPYRIGHT: Copyright 2017-2020 Mark Jansen (mark.jansen@reactos.org)
6 */
7
8#define _UNICODE

--- 18 unchanged lines hidden (view full) ---

27 int _value = (expression); \
28 ok_(file, line)(_value == (result), "Wrong value for '%s', expected: " #result " (0x%x), got: 0x%x for %c\n", \
29 #expression, (int)(result), _value, (char)key); \
30 } while (0)
31
32#define ok_wstri(x, y) \
33 ok(lstrcmpiW(x, y) == 0, "Wrong string. Expected '%S', got '%S'\n", y, x)
34
1/*
2 * PROJECT: ReactOS api tests
3 * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
4 * PURPOSE: Test for IACLCustomMRU objects
5 * COPYRIGHT: Copyright 2017-2020 Mark Jansen (mark.jansen@reactos.org)
6 */
7
8#define _UNICODE

--- 18 unchanged lines hidden (view full) ---

27 int _value = (expression); \
28 ok_(file, line)(_value == (result), "Wrong value for '%s', expected: " #result " (0x%x), got: 0x%x for %c\n", \
29 #expression, (int)(result), _value, (char)key); \
30 } while (0)
31
32#define ok_wstri(x, y) \
33 ok(lstrcmpiW(x, y) == 0, "Wrong string. Expected '%S', got '%S'\n", y, x)
34
35struct CCoInit
36{
37 CCoInit() { hres = CoInitialize(NULL); }
38 ~CCoInit() { if (SUCCEEDED(hres)) { CoUninitialize(); } }
39 HRESULT hres;
40};
41
35
42
43DEFINE_GUID(IID_IACLCustomMRU, 0xf729fc5e, 0x8769, 0x4f3e, 0xbd, 0xb2, 0xd7, 0xb5, 0x0f, 0xd2, 0x27, 0x5b);
44static const WCHAR szTestPath[] = L"TESTPATH_BROWSEUI_APITEST";
45
46#undef INTERFACE
47#define INTERFACE IACLCustomMRU
48
49/* based on https://msdn.microsoft.com/en-gb/library/windows/desktop/bb776380(v=vs.85).aspx */
50DECLARE_INTERFACE_IID_(IACLCustomMRU, IUnknown, "F729FC5E-8769-4F3E-BDB2-D7B50FD2275B")

--- 495 unchanged lines hidden (view full) ---

546 ok_hex(hr, E_FAIL);
547
548 RestoreTypedURLs(url1, url2);
549}
550
551START_TEST(IACLCustomMRU)
552{
553 CCoInit init;
36DEFINE_GUID(IID_IACLCustomMRU, 0xf729fc5e, 0x8769, 0x4f3e, 0xbd, 0xb2, 0xd7, 0xb5, 0x0f, 0xd2, 0x27, 0x5b);
37static const WCHAR szTestPath[] = L"TESTPATH_BROWSEUI_APITEST";
38
39#undef INTERFACE
40#define INTERFACE IACLCustomMRU
41
42/* based on https://msdn.microsoft.com/en-gb/library/windows/desktop/bb776380(v=vs.85).aspx */
43DECLARE_INTERFACE_IID_(IACLCustomMRU, IUnknown, "F729FC5E-8769-4F3E-BDB2-D7B50FD2275B")

--- 495 unchanged lines hidden (view full) ---

539 ok_hex(hr, E_FAIL);
540
541 RestoreTypedURLs(url1, url2);
542}
543
544START_TEST(IACLCustomMRU)
545{
546 CCoInit init;
554 ok_hex(init.hres, S_OK);
555 if (!SUCCEEDED(init.hres))
547 ok_hex(init.hr, S_OK);
548 if (!SUCCEEDED(init.hr))
556 return;
557
558 test_IACLCustomMRU_Basics();
559 test_IACLCustomMRU_UpdateOrder();
560 test_IACLCustomMRU_ExtraChars();
561 test_IACLCustomMRU_Continue();
562 test_IACLCustomMRU_TypedURLs();
563
564 Cleanup_Testdata();
565}
549 return;
550
551 test_IACLCustomMRU_Basics();
552 test_IACLCustomMRU_UpdateOrder();
553 test_IACLCustomMRU_ExtraChars();
554 test_IACLCustomMRU_Continue();
555 test_IACLCustomMRU_TypedURLs();
556
557 Cleanup_Testdata();
558}