Skip to content

Commit

Permalink
chore: add test for compute_calls_instructions_len
Browse files Browse the repository at this point in the history
  • Loading branch information
Br1ght0ne committed Nov 1, 2023
1 parent 51a4cc4 commit 019fdaa
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/fuels-programs/src/call_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,7 @@ pub fn new_variable_outputs(num: usize) -> Vec<Output> {
mod test {
use std::slice;

use fuel_asm::Instruction;
use fuels_accounts::wallet::WalletUnlocked;
use fuels_core::{
codec::ABIEncoder,
Expand Down Expand Up @@ -918,4 +919,11 @@ mod test {
expected_asset_id_amounts
)
}

#[test]
fn test_compute_calls_instructions_len() {
let call = ContractCall::new_with_random_id();
let instructions_len = compute_calls_instructions_len(&[call]).unwrap();
assert_eq!(instructions_len, Instruction::SIZE * 5);
}
}

0 comments on commit 019fdaa

Please sign in to comment.