Skip to content

Commit

Permalink
remove test function from test file
Browse files Browse the repository at this point in the history
  • Loading branch information
ungaro committed Dec 3, 2024
1 parent 3a4471f commit f41e004
Showing 1 changed file with 0 additions and 70 deletions.
70 changes: 0 additions & 70 deletions nest/test/pUSD.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -175,31 +175,6 @@ contract pUSDTest is Test {
assertEq(assets, depositAmount);
vm.stopPrank();
}
/*
function testRedeemReverts() public {
uint256 amount = 100e6;
uint256 price = 1e6;
uint64 deadline = uint64(block.timestamp + 1 hours);
vm.startPrank(user1);
token.deposit(amount, user1, user1, 0);
// Test zero address receiver
vm.expectRevert(pUSD.InvalidReceiver.selector);
token.requestRedeem(amount, address(0), user1, price, deadline);
// Test zero address controller
vm.expectRevert(pUSD.InvalidController.selector);
token.requestRedeem(amount, user1, address(0), price, deadline);
// Test expired deadline
vm.warp(deadline + 1);
vm.expectRevert(pUSD.DeadlineExpired.selector);
token.requestRedeem(amount, user1, user1, price, deadline);
vm.stopPrank();
}
*/

function testPreviewRedeem() public {
uint256 depositAmount = 100e6;
Expand Down Expand Up @@ -399,27 +374,6 @@ contract pUSDTest is Test {

vm.stopPrank();
}
/*
function testRedeemReverts() public {
uint256 amount = 100e6;
uint256 price = 1e6;
uint64 deadline = uint64(block.timestamp + 1 hours);
// Setup
vm.startPrank(user1);
token.deposit(amount, user1, user1, 0);
// Test invalid receiver
vm.expectRevert(pUSD.InvalidReceiver.selector);
token.redeem(amount, address(0), user1, price, deadline);
// Test invalid controller
vm.expectRevert(pUSD.InvalidController.selector);
token.redeem(amount, user1, address(0), price, deadline);
vm.stopPrank();
}
*/

function testRedeemDeadlineExpired() public {
uint256 amount = 100e6;
Expand Down Expand Up @@ -673,27 +627,6 @@ contract pUSDTest is Test {

assertEq(actualShares, expectedShares, "Actual shares don't match preview");
}
/*
function testPreviewRedeem() public {
uint256 depositAmount = 100e6;
uint256 redeemAmount = 50e6;
uint64 deadline = uint64(block.timestamp + 1 hours);
// Setup: First deposit some tokens
vm.startPrank(user1);
token.deposit(depositAmount, user1, user1, 0);
// Preview redeem should return same amount as assets (1:1 ratio)
uint256 expectedAssets = token.previewRedeem(redeemAmount);
assertEq(expectedAssets, redeemAmount);
// Verify actual redeem matches preview
uint256 actualAssets = token.redeem(redeemAmount, user1, user1, 1e6, deadline);
vm.stopPrank();
assertEq(actualAssets, expectedAssets, "Redeem amount doesn't match preview");
}
*/

function testBalanceOf() public {
uint256 depositAmount = 100e6;
Expand Down Expand Up @@ -728,7 +661,4 @@ contract pUSDTest is Test {
vm.stopPrank();
}

// small hack to be excluded from coverage report
function test() public { }

}

0 comments on commit f41e004

Please sign in to comment.