ninput/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:
Eric Pouech 2022-03-02 09:03:27 +01:00 committed by Alexandre Julliard
parent 219ff69ae2
commit a5286b87b8
2 changed files with 24 additions and 25 deletions

View File

@ -1,4 +1,3 @@
EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = ninput.dll
IMPORTS = ninput

View File

@ -25,14 +25,14 @@ static void test_context(void)
HRESULT hr;
hr = CreateInteractionContext(&context);
ok(hr == S_OK, "Failed to create context, hr %#x.\n", hr);
ok(hr == S_OK, "Failed to create context, hr %#lx.\n", hr);
hr = DestroyInteractionContext(context);
ok(hr == S_OK, "Failed to destroy context, hr %#x.\n", hr);
ok(hr == S_OK, "Failed to destroy context, hr %#lx.\n", hr);
hr = CreateInteractionContext(NULL);
ok(hr == E_POINTER, "Got hr %#x.\n", hr);
ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = DestroyInteractionContext(NULL);
ok(hr == E_HANDLE, "Got hr %#x.\n", hr);
ok(hr == E_HANDLE, "Got hr %#lx.\n", hr);
}
static void test_properties(void)
@ -42,44 +42,44 @@ static void test_properties(void)
HRESULT hr;
hr = CreateInteractionContext(&context);
ok(hr == S_OK, "Failed to create context, hr %#x.\n", hr);
ok(hr == S_OK, "Failed to create context, hr %#lx.\n", hr);
hr = GetPropertyInteractionContext(context, INTERACTION_CONTEXT_PROPERTY_FILTER_POINTERS, &value);
ok(hr == S_OK, "Failed to get property, hr %#x.\n", hr);
ok(hr == S_OK, "Failed to get property, hr %#lx.\n", hr);
ok(value == TRUE, "Got unexpected value %#x.\n", value);
hr = SetPropertyInteractionContext(context, INTERACTION_CONTEXT_PROPERTY_FILTER_POINTERS, TRUE);
ok(hr == S_OK, "Failed to set property, hr %#x.\n", hr);
ok(hr == S_OK, "Failed to set property, hr %#lx.\n", hr);
hr = GetPropertyInteractionContext(context, INTERACTION_CONTEXT_PROPERTY_FILTER_POINTERS, &value);
ok(hr == S_OK, "Failed to get property, hr %#x.\n", hr);
ok(hr == S_OK, "Failed to get property, hr %#lx.\n", hr);
ok(value == TRUE, "Got unexpected value %#x.\n", value);
hr = SetPropertyInteractionContext(context, INTERACTION_CONTEXT_PROPERTY_FILTER_POINTERS, FALSE);
ok(hr == S_OK, "Failed to set property, hr %#x.\n", hr);
ok(hr == S_OK, "Failed to set property, hr %#lx.\n", hr);
hr = GetPropertyInteractionContext(context, INTERACTION_CONTEXT_PROPERTY_FILTER_POINTERS, &value);
ok(hr == S_OK, "Failed to get property, hr %#x.\n", hr);
ok(hr == S_OK, "Failed to get property, hr %#lx.\n", hr);
ok(value == FALSE, "Got unexpected value %#x.\n", value);
hr = SetPropertyInteractionContext(context, INTERACTION_CONTEXT_PROPERTY_FILTER_POINTERS, 2);
ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = SetPropertyInteractionContext(context, INTERACTION_CONTEXT_PROPERTY_FILTER_POINTERS, 3);
ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = SetPropertyInteractionContext(context, 0xdeadbeef, 0);
ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = GetPropertyInteractionContext(context, 0xdeadbeef, &value);
ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = GetPropertyInteractionContext(context, INTERACTION_CONTEXT_PROPERTY_FILTER_POINTERS, NULL);
ok(hr == E_POINTER, "Got hr %#x.\n", hr);
ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = SetPropertyInteractionContext(NULL, INTERACTION_CONTEXT_PROPERTY_FILTER_POINTERS, FALSE);
ok(hr == E_HANDLE, "Got hr %#x.\n", hr);
ok(hr == E_HANDLE, "Got hr %#lx.\n", hr);
hr = GetPropertyInteractionContext(NULL, INTERACTION_CONTEXT_PROPERTY_FILTER_POINTERS, &value);
ok(hr == E_HANDLE, "Got hr %#x.\n", hr);
ok(hr == E_HANDLE, "Got hr %#lx.\n", hr);
hr = DestroyInteractionContext(context);
ok(hr == S_OK, "Failed to destroy context, hr %#x.\n", hr);
ok(hr == S_OK, "Failed to destroy context, hr %#lx.\n", hr);
}
static void test_configuration(void)
@ -101,20 +101,20 @@ static void test_configuration(void)
};
hr = CreateInteractionContext(&context);
ok(hr == S_OK, "Failed to create context, hr %#x.\n", hr);
ok(hr == S_OK, "Failed to create context, hr %#lx.\n", hr);
hr = SetInteractionConfigurationInteractionContext(NULL, 0, NULL);
ok(hr == E_HANDLE, "Got hr %#x.\n", hr);
ok(hr == E_HANDLE, "Got hr %#lx.\n", hr);
hr = SetInteractionConfigurationInteractionContext(context, 0, NULL);
ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = SetInteractionConfigurationInteractionContext(context, 1, NULL);
ok(hr == E_POINTER, "Got hr %#x.\n", hr);
ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = SetInteractionConfigurationInteractionContext(context, ARRAY_SIZE(config), config);
ok(hr == S_OK, "Failed to set configuration, hr %#x.\n", hr);
ok(hr == S_OK, "Failed to set configuration, hr %#lx.\n", hr);
hr = DestroyInteractionContext(context);
ok(hr == S_OK, "Failed to destroy context, hr %#x.\n", hr);
ok(hr == S_OK, "Failed to destroy context, hr %#lx.\n", hr);
}
START_TEST(ninput)