Skip to content

Commit

Permalink
added test
Browse files Browse the repository at this point in the history
  • Loading branch information
umadayal committed Sep 18, 2024
1 parent 145e77d commit ada64f6
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
9 changes: 8 additions & 1 deletion crates/core/executor/src/executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1430,7 +1430,7 @@ mod tests {

use crate::programs::tests::{
fibonacci_program, panic_program, simple_memory_program, simple_program,
ssz_withdrawals_program,
ssz_withdrawals_program, u256x2048_mul_program,
};

use crate::Register;
Expand Down Expand Up @@ -1459,6 +1459,13 @@ mod tests {
runtime.run().unwrap();
}

#[test]
fn test_u256xu2048_mul() {
let program = u256x2048_mul_program();
let mut runtime = Executor::new(program, SP1CoreOpts::default());
runtime.run().unwrap();
}

#[test]
fn test_ssz_withdrawals_program_run() {
let program = ssz_withdrawals_program();
Expand Down
5 changes: 5 additions & 0 deletions crates/core/executor/src/programs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,11 @@ pub mod tests {
pub const BN254_FP2_MUL_ELF: &[u8] =
include_bytes!("../../../../tests/bn254-fp2-mul/elf/riscv32im-succinct-zkvm-elf");

#[must_use]
pub fn u256x2048_mul_program() -> Program {
Program::from(U256X2048_MUL_ELF).unwrap()
}

#[must_use]
pub fn simple_program() -> Program {
let instructions = vec![
Expand Down
1 change: 1 addition & 0 deletions tests/uma-test/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,5 @@ pub fn main() {
let result_syscall = BigUint::from_bytes_le(&result_bytes);

assert_eq!(result, result_syscall);
println!("All tests passed successfully!");
}

0 comments on commit ada64f6

Please sign in to comment.