MCPcopy Create free account
hub / github.com/BitVM/BitVM / test_script_execute

Function test_script_execute

bitvm/src/lib.rs:359–376  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

357
358 #[test]
359 fn test_script_execute() {
360 let script = script! {
361 for i in 0..36 {
362 { 0x0babe123 + i }
363 }
364 };
365 let exec_result = execute_script(script);
366 // The width decides how many stack elements are printed per row
367 println!(
368 "{:width$}",
369 exec_result,
370 width = bn254::fq::Fq::N_LIMBS as usize
371 );
372 println!("{:4}", exec_result);
373 println!("{}", exec_result);
374 assert!(!exec_result.success);
375 assert_eq!(exec_result.error, None);
376 }
377
378 #[test]
379 fn test_execute_script_without_stack_limit() {

Callers

nothing calls this directly

Calls 1

execute_scriptFunction · 0.85

Tested by

no test coverage detected