bruns added inline comments.

INLINE COMMENTS

> taglibextractortest.cpp:300
> +    }
> +    QCOMPARE(resultKeys, expectedKeys);
> +}

Unfortunately QCOMPARE does not do a deep compare if sizes mismatch.

To get a better output in case the test fails, you can do something like:

  auto excessKeys() = ...
  auto missingKeys() = ...
  
  if (excessKeys().size()) {
      QWARN("Excess properties: " + excessKeys.join(", "));
      if (!failMessage.isEmpty())
          QEXPECT_FAIL(...)
      QCOMPARE(excessKeys.size(), 0);
  }
  
  if (missingKeys().size()) {
      ...
  }

REPOSITORY
  R286 KFileMetaData

REVISION DETAIL
  https://phabricator.kde.org/D12028

To: michaelh, mgallien, #baloo, #frameworks
Cc: bruns, astippich, ashaposhnikov, michaelh, spoorun, ngraham, alexeymin

Reply via email to