Skip to content

Commit

Permalink
Merge pull request #25 from ExtropyIO/fix_tests
Browse files Browse the repository at this point in the history
put back sol version, fix addToWhiteList
  • Loading branch information
extropyCoder authored Aug 31, 2024
2 parents bb74886 + 8a942ba commit 38151df
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/Gas.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.20;
pragma solidity ^0.8.0;

import "./Ownable.sol";

Expand Down
2 changes: 1 addition & 1 deletion src/Ownable.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
pragma solidity ^0.8.0;

/**
* @dev Provides information about the current execution context, including the
Expand Down
20 changes: 6 additions & 14 deletions test/Gas.UnitTests.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.20;
pragma solidity ^0.8.0;

import "forge-std/Test.sol";
import "../src/Gas.sol";
Expand Down Expand Up @@ -35,9 +35,7 @@ function get_random_address(uint256 offset) internal returns (address) {


for (uint8 ii = 0; ii < 4 ; ii++){
admins[ii] = get_random_address(ii*3);

// console.log(admins[ii]);
admins[ii] = get_random_address(ii);
}

vm.startPrank(owner);
Expand Down Expand Up @@ -187,14 +185,6 @@ function get_random_address(uint256 offset) internal returns (address) {
assertEq(isAdmin, true);
}

// TODO: No Specification
function testGetPaymentHistory() public {}

// TODO: No Specification
function testGetTradingMode() public {}

// TODO: No Specification
function testAddHistory() public {}

function testTransfer(uint256 _amount, address _recipient) public {
vm.assume(_amount <= totalSupply);
Expand All @@ -214,13 +204,15 @@ function get_random_address(uint256 offset) internal returns (address) {
}
}

function testAddToWhitelist(address user, uint256 tier) public {
function testAddToWhitelist(uint256 tier) public {
vm.expectRevert();
address user = get_random_address(13);
vm.startPrank(user);
vm.assume(user != owner);
gas.addToWhitelist(user, tier);
vm.stopPrank();
}

function testGetPaymentStatus(address sender) public {}


}

0 comments on commit 38151df

Please sign in to comment.