Skip to content

Commit

Permalink
test: Remove test subdir in favor of inline mod (#809)
Browse files Browse the repository at this point in the history
  • Loading branch information
igamigo authored Jul 30, 2024
1 parent a942c54 commit 194267b
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 25 deletions.
27 changes: 24 additions & 3 deletions miden-lib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ pub mod accounts;
pub mod notes;
pub mod transaction;

#[cfg(all(test, feature = "std"))]
mod tests;

// RE-EXPORTS
// ================================================================================================

Expand Down Expand Up @@ -60,3 +57,27 @@ impl Library for MidenLib {
self.contents.dependencies()
}
}

// TESTS
// ================================================================================================

// NOTE: Most kernel-related tests can be found under /miden-tx/kernel_tests
#[cfg(all(test, feature = "std"))]
mod tests {
use miden_objects::assembly::Library;

#[test]
fn test_compile() {
let path = "miden::kernels::tx::memory::get_input_note_ptr";
let miden = super::MidenLib::default();
let exists = miden.modules().any(|module| {
module
.ast
.procs()
.iter()
.any(|proc| module.path.append(&proc.name).unwrap().as_str() == path)
});

assert!(exists);
}
}
22 changes: 0 additions & 22 deletions miden-lib/src/tests/mod.rs

This file was deleted.

0 comments on commit 194267b

Please sign in to comment.