Skip to content

Commit

Permalink
Move dynamic loading tests to the end of main function
Browse files Browse the repository at this point in the history
  • Loading branch information
mohanson committed Sep 27, 2024
1 parent 4e45f4a commit b447001
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions contracts/ckb-std-tests/src/entry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -805,15 +805,6 @@ pub fn main() -> Result<(), Error> {
test_query();
test_calc_data_hash();

#[cfg(target_arch = "riscv64")]
unsafe {
let mut context = ContextType::new();
#[allow(deprecated)]
let mut old_context = ContextTypeOld::new();

test_dynamic_loading(&mut old_context);
test_dynamic_loading_c_impl(&mut context);
}
test_vm_version();
test_current_cycles();
test_since();
Expand All @@ -823,5 +814,16 @@ pub fn main() -> Result<(), Error> {
test_atomic2();
test_log();
}

#[cfg(target_arch = "riscv64")]
unsafe {
let mut context = ContextType::new();
#[allow(deprecated)]
let mut old_context = ContextTypeOld::new();

test_dynamic_loading(&mut old_context);
test_dynamic_loading_c_impl(&mut context);
}

Ok(())
}

0 comments on commit b447001

Please sign in to comment.