Page MenuHomePhabricator

Improve test data format for XHPAST unit tests
ClosedPublic

Authored by joshuaspence on Nov 17 2015, 11:13 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Apr 17, 2:01 PM
Unknown Object (File)
Tue, Apr 16, 12:40 PM
Unknown Object (File)
Mon, Apr 15, 11:56 PM
Unknown Object (File)
Mon, Apr 15, 11:56 PM
Unknown Object (File)
Mon, Apr 15, 11:54 PM
Unknown Object (File)
Thu, Apr 11, 12:36 AM
Unknown Object (File)
Wed, Apr 10, 9:47 AM
Unknown Object (File)
Sat, Apr 6, 5:19 AM
Subscribers

Details

Summary

Instead of having the input data and expected output stored in separate files, combine all data into a single file format similar to the *.lint-test format.

Test Plan

Ran unit tests.

Diff Detail

Repository
rPHU libphutil
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

joshuaspence retitled this revision from to Improve test data format for XHPAST unit tests.
joshuaspence updated this object.
joshuaspence edited the test plan for this revision. (Show Details)
joshuaspence added a reviewer: epriestley.
epriestley edited edge metadata.

Oh -- per D14498, these tests still kind of suck because they're almost unreadable. We'd only be slightly worse off by just hashing the tree, I think.

It would be nice to print them in some more human-readable format (mark up the input PHP file somehow to annotate tokens and the parse tree?) instead of dumping the raw JSON.

This revision is now accepted and ready to land.Nov 17 2015, 3:21 PM
This revision was automatically updated to reflect the committed changes.