mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
Propogate fixture meta to AnalysisHost
Except crate name.
This commit is contained in:
parent
2dde9b1994
commit
2c00bd8c6a
5 changed files with 113 additions and 16 deletions
|
@ -245,6 +245,35 @@ mod tests {
|
|||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_call_hierarchy_in_tests_mod() {
|
||||
check_hierarchy(
|
||||
r#"
|
||||
//- /lib.rs cfg:test
|
||||
fn callee() {}
|
||||
fn caller1() {
|
||||
call<|>ee();
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn test_caller() {
|
||||
callee();
|
||||
}
|
||||
}
|
||||
"#,
|
||||
"callee FN_DEF FileId(1) 0..14 3..9",
|
||||
&[
|
||||
"caller1 FN_DEF FileId(1) 15..45 18..25 : [34..40]",
|
||||
"test_caller FN_DEF FileId(1) 93..147 108..119 : [132..138]",
|
||||
],
|
||||
&[],
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_call_hierarchy_in_different_files() {
|
||||
check_hierarchy(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue