You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: gas_counter.rs
    path of file: ./repos/nearcore/runtime/near-vm-runner/src/logic/tests
    
    the code of the file until where you have to start completion: use crate::logic::tests::helpers::*;
use crate::logic::tests::vm_logic_builder::{TestVMLogic, VMLogicBuilder};
use crate::logic::types::Gas;
use crate::logic::MemSlice;
use crate::logic::{HostError, VMLogicError};
use crate::tests::test_vm_config;
use expect_test::expect;
use near_parameters::{ActionCosts, ExtCosts, Fee};

#[test]
fn test_dont_burn_gas_when_exceeding_attached_gas_limit() {
    let gas_limit = 10u64.pow(14);

    let mut logic_builder = VMLogicBuilder::default();
    logic_builder.config.limit_config.max_gas_burnt = gas_limit * 2;
  
    
fn out_of_gas_new_action_receipt() {
    // two different ways to create an action receipts, first check exceeding the burnt limit
    check_action_gas_exceeds_limit(ActionCosts::new_action_receipt, 1, create_action_receipt);
    check_action_gas_exceeds_limit(ActionCosts::new_action_receipt, 2, create_promise_dependency);

    // the same again, but for prepaid gas
    check_action_gas_exceeds_attached(
        ActionCosts::new_action_receipt,
        1,
        expect!["8644846690 burnt 10000000000000 used"],
        create_action_receipt,
    );

    check_action_gas_exceeds_attached(
        ActionCosts::new_action_receipt,
        2,
        expect!["9411968532130 burnt 10000000000000 used"],
        create_promise_dependency,
    );

    /// function to trigger action receipt action cost
    fn create_action_receipt(logic: &mut TestVMLogic) -> Result<(), VMLogicError> {
        promise_batch_create(logic, "rick.test")?;
        Ok(())
    }
}