Commit 6d3c83b8 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

oledb32/tests: Simplify some ok() checks (PVS-Studio).

parent 6ac25d3d
...@@ -303,27 +303,21 @@ static void test_canconvert(void) ...@@ -303,27 +303,21 @@ static void test_canconvert(void)
/* src DBTYPE_VECTOR */ /* src DBTYPE_VECTOR */
hr = IDataConvert_CanConvert(convert, simple_convert[src_idx].type | DBTYPE_VECTOR, simple_convert[dst_idx].type); hr = IDataConvert_CanConvert(convert, simple_convert[src_idx].type | DBTYPE_VECTOR, simple_convert[dst_idx].type);
expect = FALSE; ok(hr == S_FALSE,
ok((hr == S_OK && expect == TRUE) || "%04x -> %04x: got %08x expect conversion to not be possible\n", simple_convert[src_idx].type | DBTYPE_VECTOR,
(hr == S_FALSE && expect == FALSE), simple_convert[dst_idx].type, hr);
"%04x -> %04x: got %08x expect conversion to be %spossible\n", simple_convert[src_idx].type | DBTYPE_VECTOR,
simple_convert[dst_idx].type, hr, expect ? "" : "not ");
/* dst DBTYPE_VECTOR */ /* dst DBTYPE_VECTOR */
hr = IDataConvert_CanConvert(convert, simple_convert[src_idx].type, simple_convert[dst_idx].type | DBTYPE_VECTOR); hr = IDataConvert_CanConvert(convert, simple_convert[src_idx].type, simple_convert[dst_idx].type | DBTYPE_VECTOR);
expect = FALSE; ok(hr == S_FALSE,
ok((hr == S_OK && expect == TRUE) || "%04x -> %04x: got %08x expect conversion to not be possible\n", simple_convert[src_idx].type,
(hr == S_FALSE && expect == FALSE), simple_convert[dst_idx].type | DBTYPE_VECTOR, hr);
"%04x -> %04x: got %08x expect conversion to be %spossible\n", simple_convert[src_idx].type,
simple_convert[dst_idx].type | DBTYPE_VECTOR, hr, expect ? "" : "not ");
/* src & dst DBTYPE_VECTOR */ /* src & dst DBTYPE_VECTOR */
hr = IDataConvert_CanConvert(convert, simple_convert[src_idx].type | DBTYPE_VECTOR, simple_convert[dst_idx].type | DBTYPE_VECTOR); hr = IDataConvert_CanConvert(convert, simple_convert[src_idx].type | DBTYPE_VECTOR, simple_convert[dst_idx].type | DBTYPE_VECTOR);
expect = FALSE; ok(hr == S_FALSE,
ok((hr == S_OK && expect == TRUE) || "%04x -> %04x: got %08x expect conversion to not be possible\n", simple_convert[src_idx].type | DBTYPE_VECTOR,
(hr == S_FALSE && expect == FALSE), simple_convert[dst_idx].type | DBTYPE_VECTOR, hr);
"%04x -> %04x: got %08x expect conversion to be %spossible\n", simple_convert[src_idx].type | DBTYPE_VECTOR,
simple_convert[dst_idx].type | DBTYPE_VECTOR, hr, expect ? "" : "not ");
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment