From b06259673f9b535a63c0cabf4eeb935ff73d86d0 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 2 Oct 2020 17:34:31 +0200 Subject: rename mock_analysis -> fixture --- crates/ide/src/syntax_highlighting/tests.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'crates/ide/src/syntax_highlighting/tests.rs') diff --git a/crates/ide/src/syntax_highlighting/tests.rs b/crates/ide/src/syntax_highlighting/tests.rs index eaa4e163e..694c4b7fa 100644 --- a/crates/ide/src/syntax_highlighting/tests.rs +++ b/crates/ide/src/syntax_highlighting/tests.rs @@ -3,7 +3,7 @@ use std::fs; use expect_test::{expect_file, ExpectFile}; use test_utils::project_dir; -use crate::{mock_analysis::single_file, FileRange, TextRange}; +use crate::{fixture, FileRange, TextRange}; #[test] fn test_highlighting() { @@ -178,7 +178,7 @@ fn accidentally_quadratic() { let file = project_dir().join("crates/syntax/test_data/accidentally_quadratic"); let src = fs::read_to_string(file).unwrap(); - let (analysis, file_id) = single_file(&src); + let (analysis, file_id) = fixture::file(&src); // let t = std::time::Instant::now(); let _ = analysis.highlight(file_id).unwrap(); @@ -187,7 +187,7 @@ fn accidentally_quadratic() { #[test] fn test_ranges() { - let (analysis, file_id) = single_file( + let (analysis, file_id) = fixture::file( r#" #[derive(Clone, Debug)] struct Foo { @@ -228,7 +228,7 @@ fn main() { #[test] fn ranges_sorted() { - let (analysis, file_id) = single_file( + let (analysis, file_id) = fixture::file( r#" #[foo(bar = "bar")] macro_rules! test {} @@ -479,7 +479,7 @@ fn test_extern_crate() { /// result as HTML, and compares it with the HTML file given as `snapshot`. /// Note that the `snapshot` file is overwritten by the rendered HTML. fn check_highlighting(ra_fixture: &str, expect: ExpectFile, rainbow: bool) { - let (analysis, file_id) = single_file(ra_fixture); + let (analysis, file_id) = fixture::file(ra_fixture); let actual_html = &analysis.highlight_as_html(file_id, rainbow).unwrap(); expect.assert_eq(actual_html) } -- cgit v1.2.3