Skip to content
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

[test] Use filenames instead of script ID when printing test results #272

Merged
merged 1 commit into from
Jan 22, 2024

Conversation

m-Peter
Copy link
Contributor

@m-Peter m-Peter commented Jan 22, 2024

Closes #254

Description

When printing the test results, it is difficult to guess from which test file the failures come from, e.g.

error: panic: runtime error
--> 7465737400000000000000000000000000000000000000000000000000000000:9:12

vs

error: panic: runtime error
--> tests/test_script.cdc:9:12

  • Targeted PR against master branch
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work
  • Code follows the standards mentioned here
  • Updated relevant documentation
  • Re-reviewed Files changed in the Github PR explorer
  • Added appropriate labels

@m-Peter
Copy link
Contributor Author

m-Peter commented Jan 22, 2024

cc @jribbink

if err == nil {
return fmt.Sprintf("- PASS: %s", funcName)
}

interErr := err.(interpreter.Error)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At this point, can err be of a different type than interpreter.Error ?

Copy link
Member

@turbolent turbolent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@turbolent turbolent added the Improvement Technical work without new features, refactoring, improving tests label Jan 22, 2024
@turbolent turbolent merged commit 1af70a0 into onflow:master Jan 22, 2024
6 checks passed
@m-Peter m-Peter deleted the filenames-in-stacktrace branch January 22, 2024 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Improvement Technical work without new features, refactoring, improving tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Test] Stacktrace doesn't use filenames for test files
2 participants