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
F15460312: D18980.id45514.diff
Mon, Mar 31, 9:51 PM
F15458680: D18980.id45519.diff
Mon, Mar 31, 6:21 AM
F15456847: D18980.id.diff
Sun, Mar 30, 12:35 PM
F15452585: D18980.diff
Sat, Mar 29, 6:07 AM
F15413879: D18980.diff
Wed, Mar 19, 9:48 PM
Unknown Object (File)
Mar 1 2025, 12:24 PM
Unknown Object (File)
Feb 17 2025, 3:28 PM
Unknown Object (File)
Feb 9 2025, 5:10 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
Branch
finder2
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 19303
Build 26088: Run Core Tests
Build 26087: arc lint + arc unit