From 2420ac401f60091e48c7db931cb0db486f736a75 Mon Sep 17 00:00:00 2001 From: lambda-0x <0xlambda@protonmail.com> Date: Wed, 31 Jul 2024 14:08:34 +0530 Subject: [PATCH] fix formatting --- crates/sozo/ops/src/tests/call.rs | 100 ++++++++++++++----------- crates/sozo/ops/src/tests/migration.rs | 18 +++-- 2 files changed, 65 insertions(+), 53 deletions(-) diff --git a/crates/sozo/ops/src/tests/call.rs b/crates/sozo/ops/src/tests/call.rs index f14053afa0..a45162985d 100644 --- a/crates/sozo/ops/src/tests/call.rs +++ b/crates/sozo/ops/src/tests/call.rs @@ -23,15 +23,17 @@ async fn call_with_bad_address() { let provider = sequencer.provider(); let world_reader = WorldContractReader::new(world.address, provider); - assert!(call::call( - world_reader, - "0xBadCoffeeBadCode".to_string(), - ENTRYPOINT.to_string(), - vec![Felt::ZERO, Felt::ZERO], - None - ) - .await - .is_err()); + assert!( + call::call( + world_reader, + "0xBadCoffeeBadCode".to_string(), + ENTRYPOINT.to_string(), + vec![Felt::ZERO, Felt::ZERO], + None + ) + .await + .is_err() + ); } #[tokio::test] @@ -42,15 +44,17 @@ async fn call_with_bad_name() { let provider = sequencer.provider(); let world_reader = WorldContractReader::new(world.address, provider); - assert!(call::call( - world_reader, - "BadName".to_string(), - ENTRYPOINT.to_string(), - vec![Felt::ZERO, Felt::ZERO], - None - ) - .await - .is_err()); + assert!( + call::call( + world_reader, + "BadName".to_string(), + ENTRYPOINT.to_string(), + vec![Felt::ZERO, Felt::ZERO], + None + ) + .await + .is_err() + ); } #[tokio::test] @@ -61,15 +65,17 @@ async fn call_with_bad_entrypoint() { let provider = sequencer.provider(); let world_reader = WorldContractReader::new(world.address, provider); - assert!(call::call( - world_reader, - CONTRACT_TAG.to_string(), - "BadEntryPoint".to_string(), - vec![Felt::ZERO, Felt::ZERO], - None - ) - .await - .is_err()); + assert!( + call::call( + world_reader, + CONTRACT_TAG.to_string(), + "BadEntryPoint".to_string(), + vec![Felt::ZERO, Felt::ZERO], + None + ) + .await + .is_err() + ); } #[tokio::test] @@ -80,15 +86,17 @@ async fn call_with_bad_calldata() { let provider = sequencer.provider(); let world_reader = WorldContractReader::new(world.address, provider); - assert!(call::call( - world_reader, - CONTRACT_TAG.to_string(), - ENTRYPOINT.to_string(), - vec![Felt::ZERO], - None - ) - .await - .is_err()); + assert!( + call::call( + world_reader, + CONTRACT_TAG.to_string(), + ENTRYPOINT.to_string(), + vec![Felt::ZERO], + None + ) + .await + .is_err() + ); } #[tokio::test] @@ -120,13 +128,15 @@ async fn call_with_contract_address() { .await .unwrap(); - assert!(call::call( - world_reader, - format!("{:#x}", contract_address), - ENTRYPOINT.to_string(), - vec![], - None, - ) - .await - .is_ok()); + assert!( + call::call( + world_reader, + format!("{:#x}", contract_address), + ENTRYPOINT.to_string(), + vec![], + None, + ) + .await + .is_ok() + ); } diff --git a/crates/sozo/ops/src/tests/migration.rs b/crates/sozo/ops/src/tests/migration.rs index 5aa47f9ec5..8665b4866e 100644 --- a/crates/sozo/ops/src/tests/migration.rs +++ b/crates/sozo/ops/src/tests/migration.rs @@ -105,14 +105,16 @@ async fn migrate_with_small_fee_multiplier_will_fail() { let account = sequencer.account(0); - assert!(execute_strategy( - &ws, - &migration, - &account, - TxnConfig { fee_estimate_multiplier: Some(0.2f64), ..Default::default() }, - ) - .await - .is_err()); + assert!( + execute_strategy( + &ws, + &migration, + &account, + TxnConfig { fee_estimate_multiplier: Some(0.2f64), ..Default::default() }, + ) + .await + .is_err() + ); } #[tokio::test]