Files
solana/programs/bpf/rust/many_args/src/lib.rs

25 lines
541 B
Rust
Raw Normal View History

//! @brief Example Rust-based BPF program tests loop iteration
#![no_std]
2019-06-20 07:43:31 -07:00
#![allow(unused_attributes)]
mod helper;
extern crate solana_sdk_bpf_utils;
2019-06-20 16:07:12 -07:00
use solana_sdk_bpf_utils::info;
#[no_mangle]
pub extern "C" fn entrypoint(_input: *mut u8) -> bool {
2019-06-20 16:07:12 -07:00
info!("call same package");
assert_eq!(crate::helper::many_args(1, 2, 3, 4, 5, 6, 7, 8, 9), 45);
2019-06-20 16:07:12 -07:00
info!("call another package");
assert_eq!(
solana_bpf_rust_many_args_dep::many_args(1, 2, 3, 4, 5, 6, 7, 8, 9),
45
);
2019-06-20 16:07:12 -07:00
info!("Success");
true
}