diff --git a/tooling/lsp/src/lib.rs b/tooling/lsp/src/lib.rs index 82adb965b85..9887e5b8e96 100644 --- a/tooling/lsp/src/lib.rs +++ b/tooling/lsp/src/lib.rs @@ -234,3 +234,19 @@ fn prepare_source(source: String) -> (Context<'static>, CrateId) { (context, root_crate_id) } + +#[test] +fn prepare_package_from_source_string() { + let source = r#" + fn main() { + let x = 1; + let y = 2; + let z = x + y; + } + "#; + + let (mut context, crate_id) = crate::prepare_source(source.to_string()); + let _check_result = noirc_driver::check_crate(&mut context, crate_id, false, false); + let main_func_id = context.get_main_function(&crate_id); + assert!(main_func_id.is_some()); +} diff --git a/tooling/nargo/src/lib.rs b/tooling/nargo/src/lib.rs index e897248cefa..db54fd3d574 100644 --- a/tooling/nargo/src/lib.rs +++ b/tooling/nargo/src/lib.rs @@ -175,19 +175,4 @@ mod tests { assert!(paths.contains(&path)); } } - #[test] - fn prepare_package_from_source_string() { - let source = r#" - fn main() { - let x = 1; - let y = 2; - let z = x + y; - } - "#; - - let (mut context, crate_id) = crate::prepare_source(source.to_string()); - let _check_result = noirc_driver::check_crate(&mut context, crate_id, false, false); - let main_func_id = context.get_main_function(&crate_id); - assert!(main_func_id.is_some()); - } }