mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 05:45:12 +00:00
Inline snapshots for all tests in runnables.rs
This commit is contained in:
parent
8f71614bdd
commit
a72331f223
5 changed files with 68 additions and 88 deletions
|
@ -92,7 +92,26 @@ mod tests {
|
||||||
"#,
|
"#,
|
||||||
);
|
);
|
||||||
let runnables = analysis.runnables(pos.file_id).unwrap();
|
let runnables = analysis.runnables(pos.file_id).unwrap();
|
||||||
assert_debug_snapshot_matches!("runnables", &runnables)
|
assert_debug_snapshot_matches!(&runnables,
|
||||||
|
@r#"[
|
||||||
|
Runnable {
|
||||||
|
range: [1; 21),
|
||||||
|
kind: Bin,
|
||||||
|
},
|
||||||
|
Runnable {
|
||||||
|
range: [22; 46),
|
||||||
|
kind: Test {
|
||||||
|
name: "test_foo",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Runnable {
|
||||||
|
range: [47; 81),
|
||||||
|
kind: Test {
|
||||||
|
name: "test_foo",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
]"#
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
@ -108,7 +127,22 @@ mod tests {
|
||||||
"#,
|
"#,
|
||||||
);
|
);
|
||||||
let runnables = analysis.runnables(pos.file_id).unwrap();
|
let runnables = analysis.runnables(pos.file_id).unwrap();
|
||||||
assert_debug_snapshot_matches!("runnables_module", &runnables)
|
assert_debug_snapshot_matches!(&runnables,
|
||||||
|
@r#"[
|
||||||
|
Runnable {
|
||||||
|
range: [1; 59),
|
||||||
|
kind: TestMod {
|
||||||
|
path: "test_mod",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Runnable {
|
||||||
|
range: [28; 57),
|
||||||
|
kind: Test {
|
||||||
|
name: "test_foo1",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
]"#
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
@ -126,7 +160,22 @@ mod tests {
|
||||||
"#,
|
"#,
|
||||||
);
|
);
|
||||||
let runnables = analysis.runnables(pos.file_id).unwrap();
|
let runnables = analysis.runnables(pos.file_id).unwrap();
|
||||||
assert_debug_snapshot_matches!("runnables_one_depth_layer_module", &runnables)
|
assert_debug_snapshot_matches!(&runnables,
|
||||||
|
@r#"[
|
||||||
|
Runnable {
|
||||||
|
range: [23; 85),
|
||||||
|
kind: TestMod {
|
||||||
|
path: "foo::test_mod",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Runnable {
|
||||||
|
range: [46; 79),
|
||||||
|
kind: Test {
|
||||||
|
name: "test_foo1",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
]"#
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
@ -146,7 +195,22 @@ mod tests {
|
||||||
"#,
|
"#,
|
||||||
);
|
);
|
||||||
let runnables = analysis.runnables(pos.file_id).unwrap();
|
let runnables = analysis.runnables(pos.file_id).unwrap();
|
||||||
assert_debug_snapshot_matches!("runnables_multiple_depth_module", &runnables)
|
assert_debug_snapshot_matches!(&runnables,
|
||||||
|
@r#"[
|
||||||
|
Runnable {
|
||||||
|
range: [41; 115),
|
||||||
|
kind: TestMod {
|
||||||
|
path: "foo::bar::test_mod",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Runnable {
|
||||||
|
range: [68; 105),
|
||||||
|
kind: Test {
|
||||||
|
name: "test_foo1",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
]"#
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
@ -1,24 +0,0 @@
|
||||||
---
|
|
||||||
created: "2019-05-23T22:23:35.217100106Z"
|
|
||||||
creator: insta@0.8.1
|
|
||||||
source: crates/ra_ide_api/src/runnables.rs
|
|
||||||
expression: "&runnables"
|
|
||||||
---
|
|
||||||
[
|
|
||||||
Runnable {
|
|
||||||
range: [1; 21),
|
|
||||||
kind: Bin,
|
|
||||||
},
|
|
||||||
Runnable {
|
|
||||||
range: [22; 46),
|
|
||||||
kind: Test {
|
|
||||||
name: "test_foo",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
Runnable {
|
|
||||||
range: [47; 81),
|
|
||||||
kind: Test {
|
|
||||||
name: "test_foo",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
]
|
|
|
@ -1,20 +0,0 @@
|
||||||
---
|
|
||||||
created: "2019-05-23T22:23:35.219258850Z"
|
|
||||||
creator: insta@0.8.1
|
|
||||||
source: crates/ra_ide_api/src/runnables.rs
|
|
||||||
expression: "&runnables"
|
|
||||||
---
|
|
||||||
[
|
|
||||||
Runnable {
|
|
||||||
range: [1; 59),
|
|
||||||
kind: TestMod {
|
|
||||||
path: "test_mod",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
Runnable {
|
|
||||||
range: [28; 57),
|
|
||||||
kind: Test {
|
|
||||||
name: "test_foo1",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
]
|
|
|
@ -1,20 +0,0 @@
|
||||||
---
|
|
||||||
created: "2019-05-23T22:23:35.219671663Z"
|
|
||||||
creator: insta@0.8.1
|
|
||||||
source: crates/ra_ide_api/src/runnables.rs
|
|
||||||
expression: "&runnables"
|
|
||||||
---
|
|
||||||
[
|
|
||||||
Runnable {
|
|
||||||
range: [41; 115),
|
|
||||||
kind: TestMod {
|
|
||||||
path: "foo::bar::test_mod",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
Runnable {
|
|
||||||
range: [68; 105),
|
|
||||||
kind: Test {
|
|
||||||
name: "test_foo1",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
]
|
|
|
@ -1,20 +0,0 @@
|
||||||
---
|
|
||||||
created: "2019-05-23T22:23:35.224315047Z"
|
|
||||||
creator: insta@0.8.1
|
|
||||||
source: crates/ra_ide_api/src/runnables.rs
|
|
||||||
expression: "&runnables"
|
|
||||||
---
|
|
||||||
[
|
|
||||||
Runnable {
|
|
||||||
range: [23; 85),
|
|
||||||
kind: TestMod {
|
|
||||||
path: "foo::test_mod",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
Runnable {
|
|
||||||
range: [46; 79),
|
|
||||||
kind: Test {
|
|
||||||
name: "test_foo1",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
]
|
|
Loading…
Add table
Add a link
Reference in a new issue