From d79a9b17dc4fb132443aa4ec1ca0ab278d2a217c Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 14 Jan 2019 16:27:08 +0300 Subject: switch to insta for testing --- .../tests__highlight_query_group_macro.snap | 26 ++++++++ .../tests__highlights_code_inside_macros.snap | 70 ++++++++++++++++++++++ .../ra_ide_api/src/snapshots/tests__runnables.snap | 22 +++++++ .../src/snapshots/tests__runnables_module.snap | 18 ++++++ .../tests__runnables_multiple_depth_module.snap | 18 ++++++ .../tests__runnables_one_depth_layer_module.snap | 18 ++++++ 6 files changed, 172 insertions(+) create mode 100644 crates/ra_ide_api/src/snapshots/tests__highlight_query_group_macro.snap create mode 100644 crates/ra_ide_api/src/snapshots/tests__highlights_code_inside_macros.snap create mode 100644 crates/ra_ide_api/src/snapshots/tests__runnables.snap create mode 100644 crates/ra_ide_api/src/snapshots/tests__runnables_module.snap create mode 100644 crates/ra_ide_api/src/snapshots/tests__runnables_multiple_depth_module.snap create mode 100644 crates/ra_ide_api/src/snapshots/tests__runnables_one_depth_layer_module.snap (limited to 'crates/ra_ide_api/src/snapshots') diff --git a/crates/ra_ide_api/src/snapshots/tests__highlight_query_group_macro.snap b/crates/ra_ide_api/src/snapshots/tests__highlight_query_group_macro.snap new file mode 100644 index 000000000..b84aa9c78 --- /dev/null +++ b/crates/ra_ide_api/src/snapshots/tests__highlight_query_group_macro.snap @@ -0,0 +1,26 @@ +Created: 2019-01-15T11:15:20.732493641+00:00 +Creator: insta@0.1.4 +Source: crates/ra_ide_api/src/syntax_highlighting.rs + +[ + HighlightedRange { + range: [20; 32), + tag: "macro" + }, + HighlightedRange { + range: [13; 18), + tag: "text" + }, + HighlightedRange { + range: [51; 54), + tag: "keyword" + }, + HighlightedRange { + range: [55; 60), + tag: "keyword" + }, + HighlightedRange { + range: [61; 72), + tag: "function" + } +] diff --git a/crates/ra_ide_api/src/snapshots/tests__highlights_code_inside_macros.snap b/crates/ra_ide_api/src/snapshots/tests__highlights_code_inside_macros.snap new file mode 100644 index 000000000..14c6e5a4e --- /dev/null +++ b/crates/ra_ide_api/src/snapshots/tests__highlights_code_inside_macros.snap @@ -0,0 +1,70 @@ +Created: 2019-01-15T11:15:20.732523231+00:00 +Creator: insta@0.1.4 +Source: crates/ra_ide_api/src/syntax_highlighting.rs + +[ + HighlightedRange { + range: [13; 15), + tag: "keyword" + }, + HighlightedRange { + range: [16; 20), + tag: "function" + }, + HighlightedRange { + range: [41; 46), + tag: "macro" + }, + HighlightedRange { + range: [49; 52), + tag: "keyword" + }, + HighlightedRange { + range: [57; 59), + tag: "literal" + }, + HighlightedRange { + range: [82; 86), + tag: "macro" + }, + HighlightedRange { + range: [89; 92), + tag: "keyword" + }, + HighlightedRange { + range: [97; 99), + tag: "literal" + }, + HighlightedRange { + range: [49; 52), + tag: "keyword" + }, + HighlightedRange { + range: [53; 54), + tag: "function" + }, + HighlightedRange { + range: [57; 59), + tag: "literal" + }, + HighlightedRange { + range: [61; 62), + tag: "text" + }, + HighlightedRange { + range: [89; 92), + tag: "keyword" + }, + HighlightedRange { + range: [93; 94), + tag: "function" + }, + HighlightedRange { + range: [97; 99), + tag: "literal" + }, + HighlightedRange { + range: [101; 102), + tag: "text" + } +] diff --git a/crates/ra_ide_api/src/snapshots/tests__runnables.snap b/crates/ra_ide_api/src/snapshots/tests__runnables.snap new file mode 100644 index 000000000..ba6cba0ab --- /dev/null +++ b/crates/ra_ide_api/src/snapshots/tests__runnables.snap @@ -0,0 +1,22 @@ +Created: 2019-01-15T11:15:20.732460119+00:00 +Creator: insta@0.1.4 +Source: crates/ra_ide_api/src/runnables.rs + +[ + Runnable { + range: [1; 21), + kind: Bin + }, + Runnable { + range: [22; 46), + kind: Test { + name: "test_foo" + } + }, + Runnable { + range: [47; 81), + kind: Test { + name: "test_foo" + } + } +] diff --git a/crates/ra_ide_api/src/snapshots/tests__runnables_module.snap b/crates/ra_ide_api/src/snapshots/tests__runnables_module.snap new file mode 100644 index 000000000..b3f2d4d6e --- /dev/null +++ b/crates/ra_ide_api/src/snapshots/tests__runnables_module.snap @@ -0,0 +1,18 @@ +Created: 2019-01-15T11:15:20.732460109+00:00 +Creator: insta@0.1.4 +Source: crates/ra_ide_api/src/runnables.rs + +[ + Runnable { + range: [1; 59), + kind: TestMod { + path: "test_mod" + } + }, + Runnable { + range: [28; 57), + kind: Test { + name: "test_foo1" + } + } +] diff --git a/crates/ra_ide_api/src/snapshots/tests__runnables_multiple_depth_module.snap b/crates/ra_ide_api/src/snapshots/tests__runnables_multiple_depth_module.snap new file mode 100644 index 000000000..6eba482e7 --- /dev/null +++ b/crates/ra_ide_api/src/snapshots/tests__runnables_multiple_depth_module.snap @@ -0,0 +1,18 @@ +Created: 2019-01-15T11:15:20.732522773+00:00 +Creator: insta@0.1.4 +Source: crates/ra_ide_api/src/runnables.rs + +[ + Runnable { + range: [41; 115), + kind: TestMod { + path: "foo::bar::test_mod" + } + }, + Runnable { + range: [68; 105), + kind: Test { + name: "test_foo1" + } + } +] diff --git a/crates/ra_ide_api/src/snapshots/tests__runnables_one_depth_layer_module.snap b/crates/ra_ide_api/src/snapshots/tests__runnables_one_depth_layer_module.snap new file mode 100644 index 000000000..f40c762f3 --- /dev/null +++ b/crates/ra_ide_api/src/snapshots/tests__runnables_one_depth_layer_module.snap @@ -0,0 +1,18 @@ +Created: 2019-01-15T11:15:20.732480089+00:00 +Creator: insta@0.1.4 +Source: crates/ra_ide_api/src/runnables.rs + +[ + Runnable { + range: [23; 85), + kind: TestMod { + path: "foo::test_mod" + } + }, + Runnable { + range: [46; 79), + kind: Test { + name: "test_foo1" + } + } +] -- cgit v1.2.3