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

test fixes #4

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/test/VestedERC20.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,9 @@ contract VestedERC20Test is DSTest {
function testCorrectness_wrapAndClaim_transfer(uint224 underlyingAmount_)
public
{
// last test assertion will underflow if we don't
vm.assume(underlyingAmount_ > 7);

uint256 underlyingAmount = uint256(underlyingAmount_);

// clear wrapped token balance
Expand Down
6 changes: 3 additions & 3 deletions src/test/VestedERC20Factory.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ contract VestedERC20FactoryTest is DSTest {
decimals,
underlying,
startTimestamp,
startTimestamp + 365 days
uint64(startTimestamp) + 365 days
);
}

Expand All @@ -53,7 +53,7 @@ contract VestedERC20FactoryTest is DSTest {
decimals,
underlying,
startTimestamp,
startTimestamp + 365 days
uint64(startTimestamp) + 365 days
);

assertEq(vestedToken.name(), string(abi.encodePacked(name)));
Expand All @@ -66,7 +66,7 @@ contract VestedERC20FactoryTest is DSTest {
);
assertEq(
uint256(vestedToken.endTimestamp()),
uint256(startTimestamp + 365 days)
uint256(uint64(startTimestamp) + 365 days)
);
}
}
2 changes: 2 additions & 0 deletions src/test/utils/VM.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ interface VM {
function expectRevert(bytes calldata) external;

function prank(address sender) external;

function assume(bool) external;
}