-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
debt(forge
): remove testFail*
#9574
base: master
Are you sure you want to change the base?
Conversation
forge
): deprecate testFail*
forge
): remove testFail*
Moved to ExpectRevertFailures.t.sol in cli tests
60e0887
to
1eda9a5
Compare
* rm `should_fail` from runner and TestFunctionKind * update, document and add additional external tests * remove newly added morpho for now * fix --------- Co-authored-by: Yash Atreya <[email protected]>
.collect::<Vec<_>>(); | ||
|
||
if !test_fail_instances.is_empty() { | ||
return SuiteResult::new(start.elapsed(),[(format!("Found {} instances: {}", test_fail_instances.len(), test_fail_instances.join(", ")), TestResult::fail("`testFail*` has been deprecated. Consider changing to test_Revert[If|When]_Condition and expecting a revert".to_string()))].into(), warnings) |
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.
please split into multiple variables to make formatting work again
.collect::<Vec<_>>(); | ||
|
||
if !test_fail_instances.is_empty() { | ||
return SuiteResult::new(start.elapsed(),[(format!("Found {} instances: {}", test_fail_instances.len(), test_fail_instances.join(", ")), TestResult::fail("`testFail*` has been deprecated. Consider changing to test_Revert[If|When]_Condition and expecting a revert".to_string()))].into(), warnings) |
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.
return SuiteResult::new(start.elapsed(),[(format!("Found {} instances: {}", test_fail_instances.len(), test_fail_instances.join(", ")), TestResult::fail("`testFail*` has been deprecated. Consider changing to test_Revert[If|When]_Condition and expecting a revert".to_string()))].into(), warnings) | |
return SuiteResult::new(start.elapsed(),[(format!("Found {} instances: {}", test_fail_instances.len(), test_fail_instances.join(", ")), TestResult::fail("`testFail*` has been removed. Consider changing to test_Revert[If|When]_Condition and expecting a revert".to_string()))].into(), warnings) |
// This is to ensure that we don't have any stale snapshots. | ||
// If `FORGE_SNAPSHOT_CHECK` is set, we don't remove the snapshots directory as it is | ||
// required for comparison. | ||
if std::env::var_os("FORGE_SNAPSHOT_CHECK").is_none() { |
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.
this looks unrelated / merge artifact
Self::UnitTest { should_fail: true } => "testFail", | ||
Self::FuzzTest { should_fail: false } => "fuzz", | ||
Self::FuzzTest { should_fail: true } => "fuzz fail", | ||
Self::UnitTest { should_fail } => { |
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.
please revert, this is strictly worse
Motivation
Closes #4437
Solution
testFail*
.testFail*
, to cli tests to assert internal tooling failure. See failure_assertions.rs