Skip to content

Commit

Permalink
chore: push doc changes from lucas
Browse files Browse the repository at this point in the history
  • Loading branch information
Evalir committed Jul 7, 2023
1 parent 51ce22b commit 0622765
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/migrating-to-v1/breaking-changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ library EmitLib {
}
}
// intermediate "mock" contract that calls the library function
// Intermediate "mock" contract that calls the library function
// and returns the result.
contract MathLibMock {
function add(uint a, uint b) external returns (uint256) {
Expand Down
8 changes: 4 additions & 4 deletions src/migrating-to-v1/deprecated-features.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
## Deprecated features

With foundry v1, we've started deprecating features that are considered anti-patterns or might be misleading and confusing for developers. Deprecated means that while you can continue using these features, it is now a discouraged practice and you should plan on migrating away from using these.
With Foundry v1, we've started deprecating features that are considered anti-patterns or might be misleading and confusing for developers. Deprecated means that while you can continue using these features, it is now a discouraged practice and you should plan on migrating away from using these.

### Removing the Invariant keyword
### Removing the `invariant` prefix

The `invariant` test prefix has now been deprecated, and the new expected prefix is `statefulFuzz`. This is mainly to have more correctness on naming: Invariants can be tested with regular fuzz tests. The difference between Foundry's fuzz and invariant tests is that fuzz tests are *stateless* while invariant tests are *stateful*. This means that now writing tests in this manner is valid:

Expand Down Expand Up @@ -49,8 +49,8 @@ contract TestFailDeprecated is Test {
// Better way, without using testFail.
/// The call to revert_ has been refactored and is now expected to fail
/// with expectRevert()
function test_RevertIf_AlwaysReverts() public {
vm.expectRevert("This reverts);
function test_revertIf_alwaysReverts() public {
vm.expectRevert("This reverts");
// Call using `this` to increase depth
this.exposed_call_Reverter();
}
Expand Down
2 changes: 1 addition & 1 deletion src/migrating-to-v1/migrating-to-v1.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ v1 mainly increases the strictness of several cheatcodes, and accommodating this

If migration is time consuming, you can consider upgrading your local foundry installation while migrating tests, but maintaining nightly usage on CI to avoid any failures that might disrupt your workflow.

Aside from this, V1 is still the same Foundry you know.
Aside from this, v1 is still the same Foundry you know.

### I need support. Where do I go?

Expand Down

0 comments on commit 0622765

Please sign in to comment.