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

Fix-test: simplify panic message syntax in should_panic #1332

Merged

Conversation

CaptainLEVI-XXX
Copy link
Contributor

Fixes [#1139 ]

Overview

Simplifying panic message syntax across test files by removing unnecessary tuple wrappers for single-value messages.

Changes

// Before
#[should_panic(expected: ('EthAccount: invalid tx version',))]
#[should_panic(expected: ('EthAccount: invalid signature',))]
#[should_panic(expected: ('EthAccount: invalid caller',))]

// After
#[should_panic(expected: 'EthAccount: invalid tx version')]
#[should_panic(expected: 'EthAccount: invalid signature')]
#[should_panic(expected: 'EthAccount: invalid caller')]
  • Ran full test suite and formatting checks:
    • snforge test - All tests passing
    • scarb fmt -w --check - Code formatting verified

@ericnordelo
Copy link
Member

Hey @CaptainLEVI-XXX, it looks like you are using a different scarb version locally than 2.9.2, and then the format is giving you a different output. Can you please use 2.9.2 locally and format the files again?

Copy link

codecov bot commented Feb 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.41%. Comparing base (821a77a) to head (8049c88).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1332   +/-   ##
=======================================
  Coverage   89.41%   89.41%           
=======================================
  Files          81       81           
  Lines        3496     3496           
=======================================
  Hits         3126     3126           
  Misses        370      370           

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 821a77a...8049c88. Read the comment docs.

Copy link
Member

@ericnordelo ericnordelo left a comment

Choose a reason for hiding this comment

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

LGTM!

@ericnordelo ericnordelo merged commit 3c64060 into OpenZeppelin:main Feb 17, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants