From 135ffca433567746314bc8d85b21afd9d61cc5d0 Mon Sep 17 00:00:00 2001 From: Rigidus Date: Mon, 4 Nov 2024 17:19:16 +0300 Subject: [PATCH] fix e2e refs with test --- e2e/src/svm.rs | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/e2e/src/svm.rs b/e2e/src/svm.rs index c19250fd..a9039347 100644 --- a/e2e/src/svm.rs +++ b/e2e/src/svm.rs @@ -300,8 +300,8 @@ macro_rules! test_interpreter_and_jit_asm { }; } - -fn example_asm(source: &str) -> Vec { +#[test] +fn test_asm(source: &str) -> Vec { let loader = Arc::new(BuiltinProgram::new_loader( Config { enable_symbol_and_section_labels: true, @@ -317,8 +317,8 @@ fn example_asm(source: &str) -> Vec { bytecode.to_vec() } - -fn example_disasm_from_bytes(program: &[u8]) { +#[test] +fn test_disasm_from_bytes(program: &[u8]) { let loader = Arc::new(BuiltinProgram::new_mock()); let executable = Executable::::from_text_bytes( program, @@ -331,7 +331,8 @@ fn example_disasm_from_bytes(program: &[u8]) { analysis.disassemble(&mut stdout.lock()).unwrap(); } -fn execute_generated_program(prog: &[u8], mem: &mut [u8]) -> Option> { +#[test] +fn test_execute_generated_program(prog: &[u8], mem: &mut [u8]) -> Option> { let max_instruction_count = 1024; let executable = Executable::::from_text_bytes( @@ -422,6 +423,7 @@ fn execute_generated_program(prog: &[u8], mem: &mut [u8]) -> Option> { Some(mem.to_vec()) } +#[test] fn test_example_mov() { test_interpreter_and_jit_asm!( " @@ -435,6 +437,7 @@ fn test_example_mov() { ); } +#[test] fn test_example_add32() { test_interpreter_and_jit_asm!( " @@ -450,6 +453,7 @@ fn test_example_add32() { ); } +#[test] fn test_struct_func_pointer() { // This tests checks that a struct field adjacent to another field // which is a relocatable function pointer is not overwritten when @@ -578,6 +582,7 @@ fn test_struct_func_pointer() { } } +#[test] fn test_example_syscal() { test_interpreter_and_jit_asm!( " @@ -599,7 +604,7 @@ fn test_example_syscal() { ); } - +#[test] pub fn test_memory() { let bytecode = example_asm(" entrypoint: