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 fixUser integration test #13

Merged
merged 1 commit into from Mar 15, 2024
Merged

Conversation

prateek105
Copy link
Collaborator

Add unit test that covers the following mutation:



             === Mutant ID: 33 [DeleteExpressionMutation] ===

--- original
+++ mutant
@@ -98,7 +98,8 @@
 
         /// @dev zero balance
         accountBorrows[user].principal = 0;
-        accountBorrows[user].interestIndex = borrowIndex;
+        /// DeleteExpressionMutation(`accountBorrows[user].interestIndex = borrowIndex` |==> `assert(true)`) of: `accountBorrows[user].interestIndex = borrowIndex;`
+        assert(true);
 
         /// @dev current amount for a user that we'll transfer to the liquidator
         uint256 liquidated = accountTokens[user];

Path: mutants/33/src/MErc20DelegateFixer.sol

Comment on lines +762 to +766
assertEq(
IMErc20Delegator(address(mxcDotDelegator)).borrowIndex(),
IMockMErc20DelegateFixer(address(mxcDotDelegator)).getUserBorrowInterestIndex(address(this)),
"InterestIndex not updated"
);
Copy link
Collaborator

Choose a reason for hiding this comment

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

nice one!

Copy link
Collaborator

@ElliotFriedman ElliotFriedman left a comment

Choose a reason for hiding this comment

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

LGTM!

@ElliotFriedman ElliotFriedman merged commit 1d4e005 into main Mar 15, 2024
1 check passed
@ElliotFriedman ElliotFriedman deleted the add-fixUser-integration-test branch March 15, 2024 18:29
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.

None yet

2 participants