Add unit test for Device

Authored by shubham on Jul 21 2019, 7:48 PM.

Diff Detail

R16 KPMCore
No Linters Available
No Unit Test Coverage
Build Status
Buildable 14245
Build 14263: arc lint + arc unit
shubham requested review of this revision.Jul 21 2019, 7:48 PM
shubham created this revision.
stikonas added inline comments.Jul 21 2019, 8:03 PM

I think I have some USB devices that actually return empty string...

stikonas requested changes to this revision.Jul 21 2019, 8:12 PM
stikonas added inline comments.

You need to check if QList is empty before calling first()

This revision now requires changes to proceed.Jul 21 2019, 8:12 PM
cjlcarvalho added inline comments.Jul 21 2019, 8:44 PM

Why don't you check if any device from the list has the empty name instead of checking only the first one?

shubham updated this revision to Diff 62257.Jul 22 2019, 4:44 AM

Check for all the available devices

shubham updated this revision to Diff 62258.Jul 22 2019, 4:46 AM

Remove useless includes

shubham marked 2 inline comments as done.Jul 22 2019, 4:47 AM
shubham updated this revision to Diff 62259.Jul 22 2019, 4:51 AM

Remove more useless includes

stikonas accepted this revision.Jul 22 2019, 8:45 PM

I guesss it's alright to go in for now.

Although, it's a bit ugly that we are relying on devices present on tester's system... But anything else would be much harder.

This revision is now accepted and ready to land.Jul 22 2019, 8:45 PM
This revision was automatically updated to reflect the committed changes.