Page MenuHomePhabricator

Make script_tests.cpp output verbose errors.
ClosedPublic

Authored by schancel on Apr 20 2018, 21:17.

Details

Summary

Currently, when a test from script_test.json has an invalid format
the test runner outputs obtuse error messages. This commit
makes it so the test runner outputs the information that allows
programmers to figure out which JSON test has failed.

Test Plan
make check

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

deadalnix requested changes to this revision.Apr 20 2018, 21:18
deadalnix added a subscriber: deadalnix.
deadalnix added inline comments.
src/test/script_tests.cpp
1150 ↗(On Diff #3557)

So you catch a std::runtime_error in there.

1153 ↗(On Diff #3557)

So you can print e.what() as part of the error message.

This revision now requires changes to proceed.Apr 20 2018, 21:18

Address feedback from Malevolent Dictator.

deadalnix added inline comments.
src/test/script_tests.cpp
1150 ↗(On Diff #3560)

Maybe const ?

This revision is now accepted and ready to land.Apr 20 2018, 21:26
jasonbcox added a subscriber: jasonbcox.

Check why build failed. The fail message says "success" so... v0v

This revision was automatically updated to reflect the committed changes.