From dbb940fa7d040c7b46a8fba8d222fc9fac812bea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauren=C8=9Biu=20Nicola?= Date: Wed, 1 Jul 2020 18:08:45 +0300 Subject: Colorize more test fixtures --- crates/ra_proc_macro_srv/src/tests/mod.rs | 6 ++---- crates/ra_proc_macro_srv/src/tests/utils.rs | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) (limited to 'crates/ra_proc_macro_srv/src/tests') diff --git a/crates/ra_proc_macro_srv/src/tests/mod.rs b/crates/ra_proc_macro_srv/src/tests/mod.rs index 82cefbb29..8e6f28abd 100644 --- a/crates/ra_proc_macro_srv/src/tests/mod.rs +++ b/crates/ra_proc_macro_srv/src/tests/mod.rs @@ -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 diff --git a/crates/ra_proc_macro_srv/src/tests/utils.rs b/crates/ra_proc_macro_srv/src/tests/utils.rs index 8d85f2d8a..dcb00671f 100644 --- a/crates/ra_proc_macro_srv/src/tests/utils.rs +++ b/crates/ra_proc_macro_srv/src/tests/utils.rs @@ -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()); -- cgit v1.2.3