dwrite/tests: Couple more tests for IDWriteNumberSubstitution creation.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2016-05-16 20:51:35 +03:00 committed by Alexandre Julliard
parent b50342ed53
commit 7119c50940
1 changed files with 9 additions and 0 deletions

View File

@ -1207,10 +1207,16 @@ static void test_numbersubstitution(void)
IDWriteNumberSubstitution *substitution;
HRESULT hr;
/* locale is not specified, method does not require it */
hr = IDWriteFactory_CreateNumberSubstitution(factory, DWRITE_NUMBER_SUBSTITUTION_METHOD_NONE, NULL, FALSE, &substitution);
ok(hr == S_OK, "got 0x%08x\n", hr);
IDWriteNumberSubstitution_Release(substitution);
/* invalid locale name, method does not require it */
hr = IDWriteFactory_CreateNumberSubstitution(factory, DWRITE_NUMBER_SUBSTITUTION_METHOD_NONE, dummyW, FALSE, &substitution);
ok(hr == S_OK, "got 0x%08x\n", hr);
IDWriteNumberSubstitution_Release(substitution);
/* invalid method */
hr = IDWriteFactory_CreateNumberSubstitution(factory, DWRITE_NUMBER_SUBSTITUTION_METHOD_TRADITIONAL+1, NULL, FALSE, &substitution);
ok(hr == E_INVALIDARG, "got 0x%08x\n", hr);
@ -1220,6 +1226,9 @@ static void test_numbersubstitution(void)
ok(hr == E_INVALIDARG, "got 0x%08x\n", hr);
/* invalid locale */
hr = IDWriteFactory_CreateNumberSubstitution(factory, DWRITE_NUMBER_SUBSTITUTION_METHOD_TRADITIONAL, NULL, FALSE, &substitution);
ok(hr == E_INVALIDARG, "got 0x%08x\n", hr);
hr = IDWriteFactory_CreateNumberSubstitution(factory, DWRITE_NUMBER_SUBSTITUTION_METHOD_TRADITIONAL, dummyW, FALSE, &substitution);
ok(hr == E_INVALIDARG, "got 0x%08x\n", hr);