@@ -12,7 +12,7 @@ contract BondingCurveTest is Test {
1212
1313 function setUp () public {}
1414
15- function testPurchaseBaseCases () public pure {
15+ function test_PurchaseBaseCases () public pure {
1616 // Test purchase with 0 ETH supply and 1 ETH input
1717 // Should return some tokens
1818 uint256 tokensOut = BondingCurve.calculatePurchaseReturn (0 , 1 ether);
@@ -24,7 +24,7 @@ contract BondingCurveTest is Test {
2424 assert (zeroOut == 0 );
2525 }
2626
27- function testPurchasePriceIncrease () public {
27+ function test_PurchasePriceIncrease () public {
2828 // Test that token price increases with ETH supply
2929 uint256 ethIn = 1 ether ;
3030 uint256 supply1 = 10 ether ;
@@ -41,13 +41,13 @@ contract BondingCurveTest is Test {
4141 assertTrue (priceDiff > 0 && priceDiff < 50 , "Price increase should be reasonable " );
4242 }
4343
44- function testSellBaseCases () public {
44+ function test_SellBaseCases () public {
4545 // Test sell with 0 token input
4646 uint256 ethOut = BondingCurve.calculateSellReturn (1 ether, 0 );
4747 assertEq (ethOut, 0 , "Should return 0 ETH for 0 tokens " );
4848 }
4949
50- function testSellPriceDecrease () public {
50+ function test_SellPriceDecrease () public {
5151 // Setup initial state
5252 uint256 initialEthSupply = 50 ether ;
5353
@@ -60,7 +60,7 @@ contract BondingCurveTest is Test {
6060 assertTrue (ethOut2 < ethOut1, "Price should decrease after selling " );
6161 }
6262
63- function testCurveSymmetry () public {
63+ function test_CurveSymmetry () public {
6464 uint256 ethSupply = 10 ether ;
6565 uint256 ethIn = 1 ether ;
6666
@@ -75,7 +75,7 @@ contract BondingCurveTest is Test {
7575 assertTrue (ethOut > ethIn * 99 / 100 , "Slippage should be reasonable " );
7676 }
7777
78- function testExtremeValues () public {
78+ function test_ExtremeValues () public {
7979 // Test with very small amounts
8080 uint256 tinyEth = 1 wei ;
8181 uint256 tokensForTiny = BondingCurve.calculatePurchaseReturn (0 , tinyEth);
@@ -96,16 +96,16 @@ contract BondingCurveTest is Test {
9696 assertTrue (tokensForSmall < tokensForLarge, "Larger ETH input should yield more tokens " );
9797 }
9898
99- function testSellRevertOnInvalidAmount () public {
99+ function test_CannotSellOnInvalidAmount () public {
100100 uint256 ethSupply = 10 ether ;
101101
102102 // Try to sell more tokens than possible
103103 uint256 maxTokens = BondingCurve.calculatePurchaseReturn (0 , ethSupply);
104- vm.expectRevert ();
104+ vm.expectRevert (BondingCurve.FormulaInvalidTokenAmount. selector );
105105 BondingCurve.calculateSellReturn (ethSupply, maxTokens * 2 );
106106 }
107107
108- function testPriceProgression () public {
108+ function test_PriceProgression () public {
109109 uint256 ethSupply = 0 ;
110110 uint256 ethIncrement = 1 ether ;
111111 uint256 lastTokenAmount = type (uint256 ).max;
@@ -121,7 +121,7 @@ contract BondingCurveTest is Test {
121121 }
122122 }
123123
124- function testCurveParameters () public {
124+ function test_CurveParameters () public {
125125 // Test that the curve parameters produce expected behavior
126126 uint256 initialPurchase = BondingCurve.calculatePurchaseReturn (0 , 1 ether);
127127
0 commit comments