Page MenuHomePhabricator

Rewrite FileFinder tests to actually show why they break
ClosedPublic

Authored by epriestley on Jan 31 2018, 9:13 PM.
Tags
None
Referenced Files
F14088678: D18980.id45514.diff
Sun, Nov 24, 5:35 AM
Unknown Object (File)
Tue, Nov 19, 5:59 AM
Unknown Object (File)
Thu, Nov 14, 7:05 AM
Unknown Object (File)
Thu, Nov 14, 6:32 AM
Unknown Object (File)
Thu, Nov 14, 5:29 AM
Unknown Object (File)
Thu, Nov 14, 4:35 AM
Unknown Object (File)
Thu, Nov 14, 4:05 AM
Unknown Object (File)
Wed, Nov 13, 11:39 AM
Subscribers
None

Details

Summary

Depends on D18979. Currently, when you break FileFinder you get "test failure! got true, expected false on some random line".

There's no way to see why your change broke stuff, since the assertions are all these very narrow key checks in a result list.

Just test that the entire result list is what we expect so there's a nice diff in the output if you break something. Also, simplify the code.

Test Plan

arc unit is still clean, got sensible test errors while writing this.

Diff Detail

Repository
rPHU libphutil
Lint
Lint Not Applicable
Unit
Tests Not Applicable