mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
Colorize more test fixtures
This commit is contained in:
parent
87d24e7caa
commit
dbb940fa7d
6 changed files with 71 additions and 71 deletions
|
@ -11,7 +11,7 @@ fn test_derive_serialize_proc_macro() {
|
|||
"serde_derive",
|
||||
"Serialize",
|
||||
"1.0",
|
||||
r##"struct Foo {}"##,
|
||||
r"struct Foo {}",
|
||||
include_str!("fixtures/test_serialize_proc_macro.txt"),
|
||||
);
|
||||
}
|
||||
|
@ -22,9 +22,7 @@ fn test_derive_serialize_proc_macro_failed() {
|
|||
"serde_derive",
|
||||
"Serialize",
|
||||
"1.0",
|
||||
r##"
|
||||
struct {}
|
||||
"##,
|
||||
r"struct {}",
|
||||
r##"
|
||||
SUBTREE $
|
||||
IDENT compile_error 4294967295
|
||||
|
|
|
@ -44,12 +44,12 @@ pub fn assert_expand(
|
|||
crate_name: &str,
|
||||
macro_name: &str,
|
||||
version: &str,
|
||||
fixture: &str,
|
||||
ra_fixture: &str,
|
||||
expect: &str,
|
||||
) {
|
||||
let path = fixtures::dylib_path(crate_name, version);
|
||||
let expander = dylib::Expander::new(&path).unwrap();
|
||||
let fixture = parse_string(fixture).unwrap();
|
||||
let fixture = parse_string(ra_fixture).unwrap();
|
||||
|
||||
let res = expander.expand(macro_name, &fixture.subtree, None).unwrap();
|
||||
assert_eq_text!(&format!("{:?}", res), &expect.trim());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue