-
Notifications
You must be signed in to change notification settings - Fork 139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Cadence Testing Framework] Pretty Print Error Messages when running tests #3403
Comments
@joshuahannan Can you please share (a link to) the test code you are running? |
fun assertNoError(_ result: {Result}) {
if let error = result.error {
assert(false, message: "error: ".concat(error.message))
}
} |
cc @m-Peter |
@turbolent That's a neat idea 🙌 But the issue being raised here by Joshua, is something related to the printing of a Cadence interpreter error: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
\n\nerror: resource `FiatToken.Admin` does not conform to resource interface `OnChainMultiSig.PublicSigner`
\n --> 0000000000000007.FiatToken:334:22
\n |
\n334 | \taccess(all)\tresource Admin: OnChainMultiSig.PublicSigner, ResourceId, AdminCapReceiver {
\n | \t \t ^\n ... \n |\n391 | \t\taccess(all) fun UUID(): UInt64{
\n | \t\t ---- mismatch here
\n ... \n |\n395 | \t\taccess(all) fun getTxIndex(): UInt64{
\n | \t\t ---------- mismatch here
\n\n\n") I will check to see why it happens. Most likely something in the |
Issue to be solved
When running tests with the Cadence testing framework, the errors are spat out as a huge wall of text. It would be great if they were printed in a way that makes them easier to read.
Example:
Suggested Solution
Format the output so that the errors are easy to read and understand
The text was updated successfully, but these errors were encountered: