MCPcopy Create free account
hub / github.com/base/base / test_zero_limits

Function test_zero_limits

crates/builder/core/src/execution.rs:530–542  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

528
529 #[test]
530 fn test_zero_limits() {
531 let info = ExecutionInfo::with_capacity(10);
532 let limits = ResourceLimits {
533 block_gas_limit: 0,
534 tx_execution_time_limit_us: Some(0),
535 ..Default::default()
536 };
537 let tx = TxResources { gas_limit: 1, execution_time_us: Some(1), ..Default::default() };
538
539 // Should fail on gas limit
540 let result = info.is_tx_over_limits(&tx, &limits);
541 assert!(matches!(result, Err(TxnExecutionError::TransactionGasLimitExceeded { .. })));
542 }
543
544 #[test]
545 fn test_with_capacity_initializes_correctly() {

Callers

nothing calls this directly

Calls 1

is_tx_over_limitsMethod · 0.45

Tested by

no test coverage detected