You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The rejects_empty_swaps test could be expanded to cover more edge cases like:
Empty swap operations with non-empty funds
Empty funds with non-empty swap operations
#[test]fnrejects_empty_swaps(){// Existing test case// Add test for empty swap operations with funds
suite.execute_swap_operations(&creator,vec![],None,None,None,vec![coin(1000u128,"uwhale".to_string())],
|result| {assert_eq!(
result.unwrap_err().downcast_ref::<ContractError>(),Some(&ContractError::NoSwapOperationsProvided))},);// Add test for non-empty swap operations with no funds
suite.execute_swap_operations(&creator,
swap_operations,None,None,None,vec![],
|result| {assert_eq!(
result.unwrap_err().downcast_ref::<ContractError>(),Some(&ContractError::NoFundsProvided))},);}
Suggestions
The text was updated successfully, but these errors were encountered:
Underlying issue
The rejects_empty_swaps test could be expanded to cover more edge cases like:
Empty swap operations with non-empty funds
Empty funds with non-empty swap operations
Suggestions
The text was updated successfully, but these errors were encountered: