-
Notifications
You must be signed in to change notification settings - Fork 108
[contract] Add 3 Tests to liquidity_tests.rs (Part 1)Β #530
Copy link
Copy link
Open
Description
π Overview
Expand test coverage for the liquidity module by adding 3 new tests (Part 1 of 2).
β Tasks
- Add 3 new test functions to
contract/tests/liquidity_tests.rs - Follow existing test patterns and helper functions
- Verify all tests pass
π§ͺ New Tests (3 total)
Test 1: Add Liquidity Creates Pool
#[test]
fn test_add_liquidity_creates_pool() {
// Create market
// Add liquidity (first provider)
// Verify pool is created with correct reserves
// Verify LP tokens are minted
}Test 2: Remove Liquidity Burns Tokens
#[test]
fn test_remove_liquidity_burns_tokens() {
// Add liquidity
// Remove liquidity
// Verify LP tokens are burned
// Verify funds are returned
}Test 3: Swap Updates Reserves
#[test]
fn test_swap_updates_reserves_correctly() {
// Add liquidity
// Perform swap
// Verify reserves are updated according to constant product formula
}π Verification
- All 3 tests written
- All tests pass
- Tests follow existing patterns
- No clippy warnings
Reactions are currently unavailable