pdh/tests: Add test for size > 0 but no buffer.
This commit is contained in:
parent
84acc6f9c1
commit
52f03de951
|
@ -645,6 +645,10 @@ static void test_PdhLookupPerfNameByIndexA( void )
|
|||
"PdhLookupPerfNameByIndexA failed, got %s expected \'%% Processor Time\'\n", buffer);
|
||||
ok(size == sizeof("% Processor Time"), "PdhLookupPerfNameByIndexA failed %d\n", size);
|
||||
|
||||
size = sizeof(buffer);
|
||||
ret = PdhLookupPerfNameByIndexA( NULL, 674, NULL, &size );
|
||||
ok(ret == PDH_INVALID_ARGUMENT, "PdhLookupPerfNameByIndexA failed 0x%08x\n", ret);
|
||||
|
||||
size = sizeof(buffer);
|
||||
ret = PdhLookupPerfNameByIndexA( NULL, 674, buffer, &size );
|
||||
ok(ret == ERROR_SUCCESS, "PdhLookupPerfNameByIndexA failed 0x%08x\n", ret);
|
||||
|
@ -671,6 +675,10 @@ static void test_PdhLookupPerfNameByIndexW( void )
|
|||
ok(ret == ERROR_SUCCESS, "PdhLookupPerfNameByIndexW failed 0x%08x\n", ret);
|
||||
ok(size == sizeof(processor_time) / sizeof(WCHAR), "PdhLookupPerfNameByIndexW failed %d\n", size);
|
||||
|
||||
size = sizeof(buffer) / sizeof(WCHAR);
|
||||
ret = PdhLookupPerfNameByIndexW( NULL, 674, NULL, &size );
|
||||
ok(ret == PDH_INVALID_ARGUMENT, "PdhLookupPerfNameByIndexW failed 0x%08x\n", ret);
|
||||
|
||||
size = sizeof(buffer) / sizeof(WCHAR);
|
||||
ret = PdhLookupPerfNameByIndexW( NULL, 674, buffer, &size );
|
||||
ok(ret == ERROR_SUCCESS, "PdhLookupPerfNameByIndexW failed 0x%08x\n", ret);
|
||||
|
|
Loading…
Reference in New Issue