Skip to content

Commit

Permalink
cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
greged93 committed May 13, 2024
1 parent e4efad7 commit a02f7c2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
3 changes: 1 addition & 2 deletions src/cache/aot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,9 @@ where

#[cfg(test)]
mod tests {
use starknet_types_core::felt::Felt;

use super::*;
use crate::{utils::test::load_cairo, values::JitValue};
use starknet_types_core::felt::Felt;

#[test]
fn test_aot_compile_and_insert() {
Expand Down
7 changes: 4 additions & 3 deletions src/executor/aot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,7 @@ mod tests {
#[starknet::contract]
mod contract {
#[storage]
struct Storage {
name: felt252,
}
struct Storage {}

#[abi(embed_v0)]
impl ISimpleStorageImpl of super::ISimpleStorage<ContractState> {
Expand All @@ -214,6 +212,7 @@ mod tests {
.expect("failed to compile context");
let executor = AotNativeExecutor::from_native_module(module, OptLevel::default());

// The first function in the program is `run_test`.
let entrypoint_function_id = &program.funcs.first().expect("should have a function").id;

let result = executor
Expand All @@ -231,6 +230,7 @@ mod tests {
.expect("failed to compile context");
let executor = AotNativeExecutor::from_native_module(module, OptLevel::default());

// The second function in the program is `get_block_hash`.
let entrypoint_function_id = &program.funcs.get(1).expect("should have a function").id;

let mut syscall_handler = TestSyscallHandler;
Expand Down Expand Up @@ -265,6 +265,7 @@ mod tests {
.expect("failed to compile context");
let executor = AotNativeExecutor::from_native_module(module, OptLevel::default());

// The last function in the program is the `get` wrapper function.
let entrypoint_function_id = &starknet_program
.funcs
.last()
Expand Down

0 comments on commit a02f7c2

Please sign in to comment.