Skip to content

Commit 758a809

Browse files
committed
test: extra init asserts in foundry tests
1 parent 40714da commit 758a809

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

contracts/test/foundry/KlerosCore_Initialization.t.sol

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ contract KlerosCore_InitializationTest is KlerosCore_TestBase {
4545
assertEq(core.isSupported(GENERAL_COURT, NULL_DISPUTE_KIT), false, "General court null dk should be false");
4646
assertEq(core.isSupported(GENERAL_COURT, DISPUTE_KIT_CLASSIC), true, "General court classic dk should be true");
4747
assertEq(core.paused(), false, "Wrong paused value");
48+
assertEq(core.wNative(), address(wNative), "Wrong wNative");
49+
assertEq(address(core.jurorNft()), address(0), "Wrong jurorNft");
50+
assertEq(core.arbitrableWhitelistEnabled(), false, "Wrong arbitrableWhitelistEnabled");
4851

4952
assertEq(pinakion.name(), "Pinakion", "Wrong token name");
5053
assertEq(pinakion.symbol(), "PNK", "Wrong token symbol");
@@ -71,6 +74,9 @@ contract KlerosCore_InitializationTest is KlerosCore_TestBase {
7174
assertEq(sortitionModule.randomNumber(), 0, "randomNumber should be 0");
7275
assertEq(sortitionModule.delayedStakeWriteIndex(), 0, "delayedStakeWriteIndex should be 0");
7376
assertEq(sortitionModule.delayedStakeReadIndex(), 1, "Wrong delayedStakeReadIndex");
77+
assertEq(sortitionModule.maxStakePerJuror(), type(uint256).max, "Wrong maxStakePerJuror");
78+
assertEq(sortitionModule.maxTotalStaked(), type(uint256).max, "Wrong maxTotalStaked");
79+
assertEq(sortitionModule.totalStaked(), 0, "Wrong totalStaked");
7480

7581
(uint256 K, uint256 nodeLength) = sortitionModule.getSortitionProperties(bytes32(uint256(FORKING_COURT)));
7682
assertEq(K, 5, "Wrong tree K FORKING_COURT");
@@ -129,8 +135,8 @@ contract KlerosCore_InitializationTest is KlerosCore_TestBase {
129135
newMinStakingTime,
130136
newMaxDrawingTime,
131137
newRng,
132-
type(int256).max,
133-
type(int256).max
138+
type(uint256).max,
139+
type(uint256).max
134140
);
135141

136142
UUPSProxy proxySm = new UUPSProxy(address(smLogic), initDataSm);

contracts/test/foundry/KlerosCore_TestBase.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,8 @@ abstract contract KlerosCore_TestBase is Test {
132132
minStakingTime,
133133
maxDrawingTime,
134134
rng,
135-
type(int256).max,
136-
type(int256).max
135+
type(uint256).max,
136+
type(uint256).max
137137
);
138138

139139
UUPSProxy proxySm = new UUPSProxy(address(smLogic), initDataSm);

0 commit comments

Comments
 (0)