//! > Test completing public members of a module.

//! > test_runner_name
test_completions_text_edits

//! > cairo_project.toml
[crate_roots]
hello = "src"

[config.global]
edition = "2024_07"

//! > cairo_code
mod helper_module {
    pub trait Trait1<T> {
        fn some_method(self: @T);
    }

    pub const CONST: felt252 = 0x0;

    fn foo() {}
    pub fn bar() {}
}

mod not_exporting_module {
    const CONST: u32 = 0;
    fn foo() {}
    fn bar() {}
}

mod nested_module {
    pub mod inner {}
}

use helper_module::<caret>;
use non_exporting_module::<caret>;
use nested_module::<caret>;
use non_existent_module::<caret>;

//! > Completions #0
use helper_module::<caret>;
--------------------------
Completion: Trait1
--------------------------
Completion: CONST
--------------------------
Completion: bar

//! > Completions #1
use non_exporting_module::<caret>;

//! > Completions #2
use nested_module::<caret>;
--------------------------
Completion: inner

//! > Completions #3
use non_existent_module::<caret>;
