-
Notifications
You must be signed in to change notification settings - Fork 198
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
added unit tests for data transformer types #2876
base: master
Are you sure you want to change the base?
Conversation
Hi @Nityam573 👋, |
Hi @Nityam573 😄, Also, please fix formatting and lint, by running |
@franciszekjob i am on it will ready for review by tonight |
@franciszekjob please review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CairoU384
isn't used anywhere in this test, please fix that 🙏
#[test] | ||
fn test_invalid_hex() { | ||
let result = CairoBytes31::from_str("invalid_hex"); | ||
assert!(matches!(result, Err(ParseBytes31Error::CairoFromStrError))); | ||
} | ||
|
||
#[test] | ||
fn test_empty_string() { | ||
let result = CairoBytes31::from_str(""); | ||
assert!(matches!(result, Err(ParseBytes31Error::CairoFromStrError))); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#[test] | |
fn test_invalid_hex() { | |
let result = CairoBytes31::from_str("invalid_hex"); | |
assert!(matches!(result, Err(ParseBytes31Error::CairoFromStrError))); | |
} | |
#[test] | |
fn test_empty_string() { | |
let result = CairoBytes31::from_str(""); | |
assert!(matches!(result, Err(ParseBytes31Error::CairoFromStrError))); | |
} | |
#[test_case("wrong_string_value"; "wrong string value")] | |
#[test_case(""; "empty string")] | |
fn test_invalid_string(input: &str) { | |
let result = CairoBytes31::from_str(input); | |
assert!(matches!(result, Err(ParseBytes31Error::CairoFromStrError))); | |
} |
Also, we need to add test-case
under [dev-dependencies]
in Cargo.toml
.
Closes #2575
Introduced changes
Added u384 tests
Checklist
CHANGELOG.md