Made tests pure where applicable
Some checks are pending
CI / Foundry project (push) Waiting to run

This commit is contained in:
mic0 2024-10-24 14:35:55 +02:00
parent a8cd6a1b5c
commit cb12c772ae
Signed by: mico
GPG Key ID: A3F8023524CF1C8D

View File

@ -6,7 +6,7 @@ import {Army, Raider} from "../src/RaidGeld.sol";
import "../src/RaidGeldUtils.sol"; import "../src/RaidGeldUtils.sol";
contract raid_geldTest is Test { contract raid_geldTest is Test {
function test_0_unit_price() public { function test_0_unit_price() pure public {
// buying 1 unit of moloch_denier // buying 1 unit of moloch_denier
uint256 basePriceMolochDenier = RaidGeldUtils.calculateUnitPrice(0, 0, 1); uint256 basePriceMolochDenier = RaidGeldUtils.calculateUnitPrice(0, 0, 1);
assertEq(basePriceMolochDenier, 38); assertEq(basePriceMolochDenier, 38);
@ -28,7 +28,7 @@ contract raid_geldTest is Test {
assertGt(price, basePriceChamp * 12); assertGt(price, basePriceChamp * 12);
} }
function test_1_profits_per_second() public { function test_1_profits_per_second() pure public {
Army memory army = Army({ Army memory army = Army({
moloch_denier: Raider({ level: 1}), moloch_denier: Raider({ level: 1}),
apprentice: Raider({ level: 0}), apprentice: Raider({ level: 0}),