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
F14003688: D14500.id.diff
Sat, Oct 26, 9:20 AM
F13993483: D14500.diff
Tue, Oct 22, 11:08 PM
F13978476: D14500.diff
Fri, Oct 18, 11:23 PM
F13978462: D14500.id.diff
Fri, Oct 18, 11:18 PM
F13978457: D14500.id35075.diff
Fri, Oct 18, 11:17 PM
F13978445: D14500.id35099.diff
Fri, Oct 18, 11:13 PM
Unknown Object (File)
Sat, Oct 12, 6:13 PM
Unknown Object (File)
Sun, Oct 6, 9:58 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.