mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 05:15:04 +00:00
switch to insta for testing
This commit is contained in:
parent
8caff4e034
commit
d79a9b17dc
20 changed files with 495 additions and 195 deletions
|
@ -38,8 +38,9 @@ fn find_macro_call(node: &SyntaxNode, range: TextRange) -> Option<&ast::MacroCal
|
|||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use ra_syntax::TextRange;
|
||||
|
||||
use crate::mock_analysis::single_file_with_range;
|
||||
use test_utils::assert_eq_dbg;
|
||||
|
||||
#[test]
|
||||
fn extend_selection_inside_macros() {
|
||||
|
@ -51,6 +52,6 @@ mod tests {
|
|||
",
|
||||
);
|
||||
let r = analysis.extend_selection(frange);
|
||||
assert_eq_dbg("[51; 56)", &r);
|
||||
assert_eq!(r, TextRange::from_to(51.into(), 56.into()));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue