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

Add tests for the conversions crate #944

Merged
merged 9 commits into from
Oct 31, 2023

Conversation

devnet0x
Copy link
Contributor

Closes #599

Introduced changes

Add tests for the conversions crate

  • class_hash
  • contract_address
  • felt252
  • field_element
  • nonce
  • short_string
  • stark_felt
  • stark_hash

Breaking changes

N/A

Checklist

  • Linked relevant issue
  • [ N/A] Updated relevant documentation
  • Added relevant tests
  • Performed self-review of the code
  • [N/A] Added changes to CHANGELOG.md

@cptartur cptartur requested review from a team, MaksymilianDemitraszek, Radinyn, Arcticae and war-in and removed request for a team October 24, 2023 07:30
Copy link
Contributor

@Arcticae Arcticae left a comment

Choose a reason for hiding this comment

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

This seems fine by me, although please add more values from which we test the conversions (the ones that could be problematic, boundary values etc.)

Copy link
Member

@war-in war-in left a comment

Choose a reason for hiding this comment

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

Do you think some tests for errors would be suitable?

@devnet0x
Copy link
Contributor Author

Added boundary values and error tests. Please your review 🔎

crates/conversions/tests/e2e/short_string.rs Outdated Show resolved Hide resolved
crates/conversions/tests/helpers/hex.rs Outdated Show resolved Hide resolved
crates/conversions/tests/e2e/class_hash.rs Show resolved Hide resolved
Copy link
Member

@war-in war-in left a comment

Choose a reason for hiding this comment

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

I meant that 😅

crates/conversions/tests/e2e/short_string.rs Outdated Show resolved Hide resolved
crates/conversions/tests/e2e/short_string.rs Outdated Show resolved Hide resolved
devnet0x and others added 2 commits October 30, 2023 10:49
Co-authored-by: Marcin Warchoł <61014013+war-in@users.noreply.github.com>
Co-authored-by: Marcin Warchoł <61014013+war-in@users.noreply.github.com>
Copy link
Member

@war-in war-in left a comment

Choose a reason for hiding this comment

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

Good job 🔥 Let's wait for the @Arcticae and merge it 🚀

@Arcticae Arcticae added this pull request to the merge queue Oct 31, 2023
Merged via the queue into foundry-rs:master with commit e0f306f Oct 31, 2023
7 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.

Add tests for the conversions crate
3 participants