Improve accuracy of constraint system violation diagnostics.

This commit is contained in:
Sean Bowe
2016-11-05 11:27:23 -06:00
parent b55744e1ad
commit 5f0a73ce11
4 changed files with 30 additions and 7 deletions

View File

@@ -204,14 +204,12 @@ void invokeAPIFailure(
{
try {
invokeAPI(js, inputs, outputs, vpub_old, vpub_new, rt);
FAIL() << "It worked, when it shouldn't have!";
} catch(std::invalid_argument const & err) {
EXPECT_EQ(err.what(), reason);
return;
} catch(...) {
FAIL() << "Expected invalid_argument exception.";
}
FAIL() << "It worked, when it shouldn't have!";
}
TEST(joinsplit, h_sig)