Skip to content

Commit ea0a8b8

Browse files
committed
fix : add modifier to test & better fail assert msg
1 parent bd81a40 commit ea0a8b8

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

tests/unit/TestGsm.t.sol

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ contract TestGsm is TestGhoBase {
9191
gsm.initialize(address(this), TREASURY, DEFAULT_GSM_USDX_EXPOSURE, address(GHO_RESERVE));
9292
}
9393

94-
function testTypehash() public {
94+
function testTypehash() public view {
9595
bytes32 buyTypeHash = vm.eip712HashType('BuyAssetWithSig');
9696
bytes32 sellTypeHash = vm.eip712HashType('SellAssetWithSig');
9797
assertEq(
@@ -209,7 +209,7 @@ contract TestGsm is TestGhoBase {
209209
assertEq(
210210
digest,
211211
_getSellAssetEIP712Digest(params, block.chainid, address(GHO_GSM)),
212-
'EIP712 digest not similar'
212+
'EIP712 digest does not match'
213213
);
214214
(uint8 v, bytes32 r, bytes32 s) = vm.sign(gsmSignerKey, digest);
215215
signature = abi.encodePacked(r, s, v);
@@ -269,7 +269,7 @@ contract TestGsm is TestGhoBase {
269269
assertEq(
270270
digest,
271271
_getSellAssetEIP712Digest(params, block.chainid, address(GHO_GSM)),
272-
'EIP712 digest not similar'
272+
'EIP712 digest does not match'
273273
);
274274
(uint8 v, bytes32 r, bytes32 s) = vm.sign(gsmSignerKey, digest);
275275
signature = abi.encodePacked(r, s, v);
@@ -318,7 +318,7 @@ contract TestGsm is TestGhoBase {
318318
assertEq(
319319
digest,
320320
_getSellAssetEIP712Digest(params, block.chainid, address(GHO_GSM)),
321-
'EIP712 digest not similar'
321+
'EIP712 digest does not match'
322322
);
323323
(uint8 v, bytes32 r, bytes32 s) = vm.sign(gsmSignerKey, digest);
324324
signature = abi.encodePacked(r, s, v);
@@ -354,7 +354,7 @@ contract TestGsm is TestGhoBase {
354354
assertEq(
355355
digest,
356356
_getSellAssetEIP712Digest(params, block.chainid, address(GHO_GSM)),
357-
'EIP712 digest not similar'
357+
'EIP712 digest does not match'
358358
);
359359
(uint8 v, bytes32 r, bytes32 s) = vm.sign(gsmSignerKey, digest);
360360
signature = abi.encodePacked(r, s, v);
@@ -638,7 +638,7 @@ contract TestGsm is TestGhoBase {
638638
assertEq(
639639
digest,
640640
_getBuyAssetEIP712Digest(params, block.chainid, address(GHO_GSM)),
641-
'EIP712 digest not similar'
641+
'EIP712 digest does not match'
642642
);
643643
(uint8 v, bytes32 r, bytes32 s) = vm.sign(gsmSignerKey, digest);
644644
signature = abi.encodePacked(r, s, v);
@@ -713,7 +713,7 @@ contract TestGsm is TestGhoBase {
713713
assertEq(
714714
digest,
715715
_getBuyAssetEIP712Digest(params, block.chainid, address(GHO_GSM)),
716-
'EIP712 digest not similar'
716+
'EIP712 digest does not match'
717717
);
718718
(uint8 v, bytes32 r, bytes32 s) = vm.sign(gsmSignerKey, digest);
719719
signature = abi.encodePacked(r, s, v);
@@ -813,7 +813,7 @@ contract TestGsm is TestGhoBase {
813813
assertEq(
814814
digest,
815815
_getBuyAssetEIP712Digest(params, block.chainid, address(GHO_GSM)),
816-
'EIP712 digest not similar'
816+
'EIP712 digest does not match'
817817
);
818818
(uint8 v, bytes32 r, bytes32 s) = vm.sign(gsmSignerKey, digest);
819819
signature = abi.encodePacked(r, s, v);
@@ -848,7 +848,7 @@ contract TestGsm is TestGhoBase {
848848
assertEq(
849849
digest,
850850
_getBuyAssetEIP712Digest(params, block.chainid, address(GHO_GSM)),
851-
'EIP712 digest not similar'
851+
'EIP712 digest does not match'
852852
);
853853
(uint8 v, bytes32 r, bytes32 s) = vm.sign(gsmSignerKey, digest);
854854
signature = abi.encodePacked(r, s, v);

0 commit comments

Comments
 (0)