autotests: Test for multiple values
Needs RevisionPublic

Authored by michaelh on Apr 14 2018, 4:01 PM.

Details

Reviewers
mgallien
bruns
Group Reviewers
Baloo
Frameworks
Summary

Prepare sample files for tags which may have multiple values

  • epub: 'dc:subject'
  • office docs: keyword
  • audio; artist + genre

Create partially failing tests for subject, keywords, artist

Test Plan

make test

Diff Detail

Repository
R286 KFileMetaData
Branch
multi-value-test (branched from master)
Lint
No Linters Available
Unit
No Unit Test Coverage
michaelh created this revision.Apr 14 2018, 4:01 PM
Restricted Application added projects: Frameworks, Baloo. · View Herald TranscriptApr 14 2018, 4:01 PM
michaelh requested review of this revision.Apr 14 2018, 4:01 PM
michaelh added inline comments.Apr 14 2018, 4:07 PM
autotests/multivaluetest.cpp
87

The following behaviours need to be discussed. They are just suggestions.

bruns added a subscriber: bruns.Apr 15 2018, 2:50 AM

"Prepare sample files for tags which may have multiple values"

michaelh edited the summary of this revision. (Show Details)Apr 15 2018, 12:15 PM
mgallien accepted this revision.Apr 18 2018, 7:51 PM

Thanks

This revision is now accepted and ready to land.Apr 18 2018, 7:51 PM
mgallien requested changes to this revision.Apr 18 2018, 8:00 PM

The test for mp3 is failing to complete. I am investigating.

This revision now requires changes to proceed.Apr 18 2018, 8:00 PM
mgallien accepted this revision.Apr 18 2018, 8:05 PM

Sorry, that was a local problem.

This revision is now accepted and ready to land.Apr 18 2018, 8:05 PM
bruns added inline comments.Apr 19 2018, 1:05 AM
autotests/multivaluetest.cpp
91

Here you use the property value directly, while in other places you use the property variable - I think using the value directly is much easier to read.

92

Again, I prefer this notation versus expectedresult
You can make this somewhat shorter by using QVariantList{QStringLiteral{"Baloo KFileMetaData"}}, i.e. omit the extra QVariant

michaelh updated this revision to Diff 32559.Apr 19 2018, 12:41 PM
  • Rebase
  • Apply some suggested changes
michaelh requested review of this revision.Apr 19 2018, 12:46 PM
michaelh added a reviewer: bruns.
michaelh marked an inline comment as done.
michaelh added inline comments.
autotests/multivaluetest.cpp
92

I want defend expectedresult a little. The background: testXXX_data functions tend to be very long and it is easy (for me) to get confused about what is tested against which value. expectedresult tries to make clear that it is always the same value.
If you can't/don't agree with that. I'll follow your lead :-)

mgallien accepted this revision.May 5 2018, 9:24 AM
This revision is now accepted and ready to land.May 5 2018, 9:24 AM
ngraham added a subscriber: ngraham.May 9 2018, 6:50 PM

@michaelh Ping! Can we land this?

Restricted Application added a subscriber: kde-frameworks-devel. · View Herald TranscriptMay 9 2018, 6:50 PM
bruns requested changes to this revision.May 9 2018, 9:52 PM

This depends on the pending discussion how "Subject" and "Keyword" should be handled, see D10694

This revision now requires changes to proceed.May 9 2018, 9:52 PM