Skip to content

Commit

Permalink
fixup: add test for macro
Browse files Browse the repository at this point in the history
  • Loading branch information
tjdevries committed May 31, 2023
1 parent cc55ee7 commit af21847
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions bindings/rust/src/symbol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -525,4 +525,27 @@ mod test {
})
);
}

#[test]
fn parses_rust_method_with_macro() {
let input_symbol = "rust-analyzer cargo test_rust_dependency 0.1.0 println!";

assert_eq!(
parse_symbol(input_symbol).expect("rust symbol"),
Symbol {
scheme: "rust-analyzer".to_string(),
package: Package::new_with_values("cargo", "test_rust_dependency", "0.1.0"),
descriptors: vec![new_descriptor(
"println".to_string(),
descriptor::Suffix::Macro
),],
special_fields: SpecialFields::default(),
}
);

assert_eq!(
input_symbol,
format_symbol(parse_symbol(input_symbol).expect("rust symbol"))
)
}
}

0 comments on commit af21847

Please sign in to comment.