11// SPDX-License-Identifier: MIT
22pragma solidity >= 0.7.0 < 0.9.0 ;
33
4- import "../src/Test.sol " ;
4+ import {Test} from "../src/Test.sol " ;
55
66contract StdChainsMock is Test {
77 function exposed_getChain (string memory chainAlias ) public returns (Chain memory ) {
@@ -84,23 +84,23 @@ contract StdChainsTest is Test {
8484 // _testRpc("flare_coston2");
8585 // }
8686
87- function test_ChainNoDefault () public {
87+ function test_RevertIf_ChainNotFound () public {
8888 // We deploy a mock to properly test the revert.
8989 StdChainsMock stdChainsMock = new StdChainsMock ();
9090
9191 vm.expectRevert ("StdChains getChain(string): Chain with alias \" does_not_exist \" not found. " );
9292 stdChainsMock.exposed_getChain ("does_not_exist " );
9393 }
9494
95- function test_SetChainFirstFails () public {
95+ function test_RevertIf_SetChain_ChainIdExist_FirstTest () public {
9696 // We deploy a mock to properly test the revert.
9797 StdChainsMock stdChainsMock = new StdChainsMock ();
9898
9999 vm.expectRevert ("StdChains setChain(string,ChainData): Chain ID 31337 already used by \" anvil \" . " );
100100 stdChainsMock.exposed_setChain ("anvil2 " , ChainData ("Anvil " , 31337 , "URL " ));
101101 }
102102
103- function test_ChainBubbleUp () public {
103+ function test_RevertIf_ChainBubbleUp () public {
104104 // We deploy a mock to properly test the revert.
105105 StdChainsMock stdChainsMock = new StdChainsMock ();
106106
@@ -111,7 +111,7 @@ contract StdChainsTest is Test {
111111 stdChainsMock.exposed_getChain ("needs_undefined_env_var " );
112112 }
113113
114- function test_CannotSetChain_ChainIdExists () public {
114+ function test_RevertIf_SetChain_ChainIdExists_SecondTest () public {
115115 // We deploy a mock to properly test the revert.
116116 StdChainsMock stdChainsMock = new StdChainsMock ();
117117
@@ -148,47 +148,47 @@ contract StdChainsTest is Test {
148148 assertEq (chainById.chainId, 123456789 );
149149 }
150150
151- function test_SetNoEmptyAlias () public {
151+ function test_RevertIf_SetEmptyAlias () public {
152152 // We deploy a mock to properly test the revert.
153153 StdChainsMock stdChainsMock = new StdChainsMock ();
154154
155155 vm.expectRevert ("StdChains setChain(string,ChainData): Chain alias cannot be the empty string. " );
156156 stdChainsMock.exposed_setChain ("" , ChainData ("" , 123456789 , "" ));
157157 }
158158
159- function test_SetNoChainId0 () public {
159+ function test_RevertIf_SetNoChainId0 () public {
160160 // We deploy a mock to properly test the revert.
161161 StdChainsMock stdChainsMock = new StdChainsMock ();
162162
163163 vm.expectRevert ("StdChains setChain(string,ChainData): Chain ID cannot be 0. " );
164164 stdChainsMock.exposed_setChain ("alias " , ChainData ("" , 0 , "" ));
165165 }
166166
167- function test_GetNoChainId0 () public {
167+ function test_RevertIf_GetNoChainId0 () public {
168168 // We deploy a mock to properly test the revert.
169169 StdChainsMock stdChainsMock = new StdChainsMock ();
170170
171171 vm.expectRevert ("StdChains getChain(uint256): Chain ID cannot be 0. " );
172172 stdChainsMock.exposed_getChain (0 );
173173 }
174174
175- function test_GetNoEmptyAlias () public {
175+ function test_RevertIf_GetNoEmptyAlias () public {
176176 // We deploy a mock to properly test the revert.
177177 StdChainsMock stdChainsMock = new StdChainsMock ();
178178
179179 vm.expectRevert ("StdChains getChain(string): Chain alias cannot be the empty string. " );
180180 stdChainsMock.exposed_getChain ("" );
181181 }
182182
183- function test_ChainIdNotFound () public {
183+ function test_RevertIf_ChainIdNotFound () public {
184184 // We deploy a mock to properly test the revert.
185185 StdChainsMock stdChainsMock = new StdChainsMock ();
186186
187187 vm.expectRevert ("StdChains getChain(string): Chain with alias \" no_such_alias \" not found. " );
188188 stdChainsMock.exposed_getChain ("no_such_alias " );
189189 }
190190
191- function test_ChainAliasNotFound () public {
191+ function test_RevertIf_ChainAliasNotFound () public {
192192 // We deploy a mock to properly test the revert.
193193 StdChainsMock stdChainsMock = new StdChainsMock ();
194194
@@ -214,7 +214,7 @@ contract StdChainsTest is Test {
214214 assertEq (modifiedChain.rpcUrl, "https://modified.chain/ " );
215215 }
216216
217- function test_DontUseDefaultRpcUrl () public {
217+ function test_RevertIf_DontUseDefaultRpcUrl () public {
218218 // We deploy a mock to properly test the revert.
219219 StdChainsMock stdChainsMock = new StdChainsMock ();
220220
0 commit comments