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: primitives.rs
    path of file: ./repos/solang/tests/solana_tests
    
    the code of the file until where you have to start completion: // SPDX-License-Identifier: Apache-2.0

use crate::{build_solidity, Account, BorshToken};
use base58::FromBase58;
use num_bigint::{BigInt, BigUint, RandBigInt, ToBigInt};
use num_traits::{One, Pow, ToPrimitive, Zero};
use rand::seq::SliceRandom;
use rand::Rng;
use std::ops::BitAnd;
use std::ops::Div;
use std::ops::Mul;
use std::ops::Rem;
use std::ops::Shl;
use std::ops::Shr;
use std::ops::Sub;
use std::ops::{Add, AddAssign, BitOr, BitXor, MulAssign, Neg, ShlAssign, ShrAssign, SubAssign};

#[test]
#[should_panic]
fn assert_false() {
    // without a working assert, this is not going to work
    let mut vm = build_solidity(
        r#"
        contract foo {
            function assert_fails() public {
                req
    
fn test_mul_within_range() {
    let mut rng = rand::thread_rng();
    for width in (8..=256).step_by(8) {
        let src = r#"
        contract test {
            function mul(uintN a, uintN b) public returns (uintN) {
                return a * b;
            }
        }"#
        .replace("intN", &format!("int{width}"));

        let mut contract = build_solidity(&src);
        let data_account = contract.initialize_data_account();
        contract
            .function("new")
            .accounts(vec![("dataAccount", data_account)])
            .call();

        for _ in 0..10 {
            // Max number to fit unsigned N bits is (2^N)-1
            let mut limit: BigUint = BigUint::from(2_u32).pow(width as u32);
            limit.sub_assign(1u8);

            // Generate a random number within the the range [0, 2^N -1]
            let first_operand_rand = rng.gen_biguint_range(&BigUint::from(1usize), &limit);

            // Calculate a number that when multiplied by first_operand_rand, the result will not overflow N bits (the result of this division will cast the float result to int result, therefore lowering it. The result of multiplication will never overflow).
            let second_operand_rand = limit.div(&first_operand_rand);

            let return_value = contract
                .function("mul")
                .arguments(&[
                    BorshToken::Uint {
                        width: width as u16,
                        value: first_operand_rand.to_bigint().unwrap(),
                    },
                    BorshToken::Uint {
                        width: width as u16,
                        value: second_operand_rand.to_bigint().unwrap(),
                    },
                ])
                .call()
                .unwrap();
            let res = first_operand_rand * second_operand_rand;

            assert_eq!(
                return_value,
                BorshToken::Uint {
                    width: (width as u16).next_power_of_two(),
                    value: res.to_bigint().unwrap(),
                }
            );
        }
    }
}