From eb14d632d998b7258bf4d05546360caec5748c3d Mon Sep 17 00:00:00 2001 From: Rostyslav Tyshko Date: Thu, 26 Jun 2025 23:15:45 -0400 Subject: [PATCH] add test_gas_limits_check_insufficient_funds --- zkvm/src/lib.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/zkvm/src/lib.rs b/zkvm/src/lib.rs index 9ea223e..ab61f45 100644 --- a/zkvm/src/lib.rs +++ b/zkvm/src/lib.rs @@ -527,4 +527,14 @@ mod tests { assert!(result.is_ok()); } +#[test] + fn test_gas_limits_check_insufficient_funds() { + let message = 1; + let message_2 = 2; + let gas_calc = GasCalculator::new(1, 1, 1, 1, 1, 1000000, 1000000); + + let result = gas_limits_check(vec![message, message_2], SUMMATION_ELF, &gas_calc, 1); + assert!(matches!(result, Err(ExecutionFailureKind::InsufficientFundsError))); + } + }