diff --git a/fhevm-engine/coprocessor/src/tests/scheduling_bench.rs b/fhevm-engine/coprocessor/src/tests/scheduling_bench.rs index 976dee1c..0f7564e8 100644 --- a/fhevm-engine/coprocessor/src/tests/scheduling_bench.rs +++ b/fhevm-engine/coprocessor/src/tests/scheduling_bench.rs @@ -202,7 +202,7 @@ async fn schedule_multi_erc20() -> Result<(), Box> { "10" if i % 4 == 1 => (), // select trxa "90" if i % 4 == 2 => (), // bals - trxa "30" if i % 4 == 3 => (), // bald + trxa - s => assert!(false, "unexpected result: {} for output {i}", s), + s => panic!("unexpected result: {} for output {i}", s), } } Ok(()) diff --git a/fhevm-engine/executor/tests/scheduling_mapping.rs b/fhevm-engine/executor/tests/scheduling_mapping.rs index 48f1169b..bbb1ee18 100644 --- a/fhevm-engine/executor/tests/scheduling_mapping.rs +++ b/fhevm-engine/executor/tests/scheduling_mapping.rs @@ -178,6 +178,6 @@ async fn schedule_multi_erc20() { } } } - Resp::Error(e) => assert!(false, "error response: {}", e), + Resp::Error(e) => panic!("error response: {}", e), } } diff --git a/fhevm-engine/executor/tests/scheduling_patterns.rs b/fhevm-engine/executor/tests/scheduling_patterns.rs index 918cc52e..a484859d 100644 --- a/fhevm-engine/executor/tests/scheduling_patterns.rs +++ b/fhevm-engine/executor/tests/scheduling_patterns.rs @@ -245,11 +245,11 @@ async fn schedule_dependent_computations() { ), } } - _ => assert!(false, "unexpected handle 0x{:x}", ct.handle[0]), + _ => panic!("unexpected handle 0x{:x}", ct.handle[0]), } } } - Resp::Error(e) => assert!(false, "error response: {}", e), + Resp::Error(e) => panic!("error response: {}", e), } } @@ -539,11 +539,11 @@ async fn schedule_y_patterns() { ), } } - _ => assert!(false, "unexpected handle 0x{:x}", ct.handle[0]), + _ => panic!("unexpected handle 0x{:x}", ct.handle[0]), } } } - Resp::Error(e) => assert!(false, "error response: {}", e), + Resp::Error(e) => panic!("error response: {}", e), } } @@ -831,10 +831,10 @@ async fn schedule_diamond_reduction_dependence_pattern() { ), } } - _ => assert!(false, "unexpected handle 0x{:x}", ct.handle[0]), + _ => panic!("unexpected handle 0x{:x}", ct.handle[0]), } } } - Resp::Error(e) => assert!(false, "error response: {}", e), + Resp::Error(e) => panic!("error response: {}", e), } } diff --git a/fhevm-engine/executor/tests/sync_compute.rs b/fhevm-engine/executor/tests/sync_compute.rs index 2fefd223..250219fc 100644 --- a/fhevm-engine/executor/tests/sync_compute.rs +++ b/fhevm-engine/executor/tests/sync_compute.rs @@ -50,12 +50,12 @@ async fn get_input_ciphertext() { Resp::ResultCiphertexts(cts) => match (cts.ciphertexts.first(), cts.ciphertexts.len()) { (Some(ct), 1) => { if ct.handle != input_handle || ct.serialization.is_empty() { - assert!(false, "response handle or ciphertext are unexpected"); + panic!("response handle or ciphertext are unexpected"); } } - _ => assert!(false, "no response"), + _ => panic!("no response"), }, - Resp::Error(e) => assert!(false, "error: {}", e), + Resp::Error(e) => panic!("error: {}", e), } } @@ -111,7 +111,7 @@ async fn compute_on_two_serialized_ciphertexts() { Resp::ResultCiphertexts(cts) => match (cts.ciphertexts.first(), cts.ciphertexts.len()) { (Some(ct), 1) => { if ct.handle != vec![0xaa; HANDLE_LEN] { - assert!(false, "response handle is unexpected"); + panic!("response handle is unexpected"); } let ct = SupportedFheCiphertexts::decompress(3, &ct.serialization).unwrap(); match ct @@ -119,12 +119,12 @@ async fn compute_on_two_serialized_ciphertexts() { .as_str() { "21" => (), - s => assert!(false, "unexpected result: {}", s), + s => panic!("unexpected result: {}", s), } } - _ => assert!(false, "unexpected amount of result ciphertexts returned"), + _ => panic!("unexpected amount of result ciphertexts returned"), }, - Resp::Error(e) => assert!(false, "error response: {}", e), + Resp::Error(e) => panic!("error response: {}", e), } } @@ -178,7 +178,7 @@ async fn compute_on_compact_and_serialized_ciphertexts() { Resp::ResultCiphertexts(cts) => match (cts.ciphertexts.first(), cts.ciphertexts.len()) { (Some(ct), 1) => { if ct.handle != vec![0xaa; HANDLE_LEN] { - assert!(false, "response handle is unexpected"); + panic!("response handle is unexpected"); } let ct = SupportedFheCiphertexts::decompress(3, &ct.serialization).unwrap(); match ct @@ -186,12 +186,12 @@ async fn compute_on_compact_and_serialized_ciphertexts() { .as_str() { "21" => (), - s => assert!(false, "unexpected result: {}", s), + s => panic!("unexpected result: {}", s), } } - _ => assert!(false, "unexpected amount of result ciphertexts returned"), + _ => panic!("unexpected amount of result ciphertexts returned"), }, - Resp::Error(e) => assert!(false, "error response: {}", e), + Resp::Error(e) => panic!("error response: {}", e), } } @@ -256,7 +256,7 @@ async fn compute_on_result_ciphertext() { Resp::ResultCiphertexts(cts) => match (cts.ciphertexts.get(1), cts.ciphertexts.len()) { (Some(ct), 2) => { if ct.handle != vec![0xbb; HANDLE_LEN] { - assert!(false, "response handle is unexpected"); + panic!("response handle is unexpected"); } let ct = SupportedFheCiphertexts::decompress(3, &ct.serialization).unwrap(); match ct @@ -264,12 +264,12 @@ async fn compute_on_result_ciphertext() { .as_str() { "32" => (), - s => assert!(false, "unexpected result: {}", s), + s => panic!("unexpected result: {}", s), } } - _ => assert!(false, "unexpected amount of result ciphertexts returned"), + _ => panic!("unexpected amount of result ciphertexts returned"), }, - Resp::Error(e) => assert!(false, "error response: {}", e), + Resp::Error(e) => panic!("error response: {}", e), } } @@ -314,11 +314,11 @@ async fn trivial_encryption_scalar_less_than_32_bytes() { .as_str() { "10" => (), - s => assert!(false, "unexpected result: {}", s), + s => panic!("unexpected result: {}", s), } } _ => panic!("unexpected amount of result ciphertexts returned: {}", cts.ciphertexts.len()), }, - Resp::Error(e) => assert!(false, "error response: {}", e), + Resp::Error(e) => panic!("error response: {}", e), } } \ No newline at end of file