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
Unknown Object (File)
Fri, Jan 17, 2:26 PM
Unknown Object (File)
Fri, Jan 17, 1:29 PM
Unknown Object (File)
Mon, Jan 13, 12:06 PM
Unknown Object (File)
Fri, Jan 10, 7:10 PM
Unknown Object (File)
Fri, Jan 3, 1:15 AM
Unknown Object (File)
Dec 3 2024, 1:59 PM
Unknown Object (File)
Nov 28 2024, 2:15 AM
Unknown Object (File)
Nov 27 2024, 6:38 PM
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