aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src/snapshots
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide_api/src/snapshots')
-rw-r--r--crates/ra_ide_api/src/snapshots/highlighting.html45
-rw-r--r--crates/ra_ide_api/src/snapshots/tests__highlighting.snap146
-rw-r--r--crates/ra_ide_api/src/snapshots/tests__rename_mod.snap30
-rw-r--r--crates/ra_ide_api/src/snapshots/tests__rename_mod_in_dir.snap30
-rw-r--r--crates/ra_ide_api/src/snapshots/tests__runnables.snap18
-rw-r--r--crates/ra_ide_api/src/snapshots/tests__runnables_module.snap16
-rw-r--r--crates/ra_ide_api/src/snapshots/tests__runnables_multiple_depth_module.snap16
-rw-r--r--crates/ra_ide_api/src/snapshots/tests__runnables_one_depth_layer_module.snap16
8 files changed, 108 insertions, 209 deletions
diff --git a/crates/ra_ide_api/src/snapshots/highlighting.html b/crates/ra_ide_api/src/snapshots/highlighting.html
new file mode 100644
index 000000000..bfc0a67b1
--- /dev/null
+++ b/crates/ra_ide_api/src/snapshots/highlighting.html
@@ -0,0 +1,45 @@
1
2<style>
3pre {
4 color: #DCDCCC;
5 background-color: #3F3F3F;
6 font-size: 22px;
7}
8
9.comment { color: #7F9F7F; }
10.string { color: #CC9393; }
11.function { color: #93E0E3; }
12.parameter { color: #94BFF3; }
13.builtin { color: #DD6718; }
14.text { color: #DCDCCC; }
15.attribute { color: #BFEBBF; }
16.literal { color: #DFAF8F; }
17.macro { color: #DFAF8F; }
18
19.keyword { color: #F0DFAF; }
20.keyword\.unsafe { color: #F0DFAF; font-weight: bold; }
21.keyword\.control { color: #DC8CC3; }
22
23</style>
24<pre><code>
25<span class="attribute">#</span><span class="attribute">[</span><span class="attribute">derive</span><span class="attribute">(</span><span class="attribute">Clone</span><span class="attribute">,</span><span class="attribute"> </span><span class="attribute">Debug</span><span class="attribute">)</span><span class="attribute">]</span>
26<span class="keyword">struct</span> <span class="function">Foo</span> {
27 <span class="keyword">pub</span> <span class="function">x</span>: <span class="text">i32</span>,
28 <span class="keyword">pub</span> <span class="function">y</span>: <span class="text">i32</span>,
29}
30
31<span class="keyword">fn</span> <span class="function">foo</span>&lt;<span class="type function">T</span>&gt;() -&gt; <span class="type">T</span> {
32 <span class="macro">unimplemented</span><span class="macro">!</span>();
33}
34
35<span class="comment">// comment</span>
36<span class="keyword">fn</span> <span class="function">main</span>() {
37 <span class="macro">println</span><span class="macro">!</span>(<span class="string">"Hello, {}!"</span>, <span class="literal">92</span>);
38
39 <span class="keyword">let</span> <span class="keyword">mut</span> <span class="function">vec</span> = <span class="text">Vec</span>::<span class="text">new</span>();
40 <span class="keyword.control">if</span> <span class="keyword">true</span> {
41 <span class="text">vec</span>.<span class="text">push</span>(<span class="type">Foo</span> { <span class="field">x</span>: <span class="literal">0</span>, <span class="field">y</span>: <span class="literal">1</span> });
42 }
43 <span class="keyword.unsafe">unsafe</span> { <span class="text">vec</span>.<span class="text">set_len</span>(<span class="literal">0</span>); }
44}
45</code></pre> \ No newline at end of file
diff --git a/crates/ra_ide_api/src/snapshots/tests__highlighting.snap b/crates/ra_ide_api/src/snapshots/tests__highlighting.snap
deleted file mode 100644
index 9d4c04db3..000000000
--- a/crates/ra_ide_api/src/snapshots/tests__highlighting.snap
+++ /dev/null
@@ -1,146 +0,0 @@
1---
2created: "2019-05-23T12:10:32.628883358Z"
3creator: [email protected]
4source: crates/ra_ide_api/src/syntax_highlighting.rs
5expression: result
6---
7Ok(
8 [
9 HighlightedRange {
10 range: [1; 24),
11 tag: "attribute"
12 },
13 HighlightedRange {
14 range: [25; 31),
15 tag: "keyword"
16 },
17 HighlightedRange {
18 range: [32; 35),
19 tag: "function"
20 },
21 HighlightedRange {
22 range: [42; 45),
23 tag: "keyword"
24 },
25 HighlightedRange {
26 range: [46; 47),
27 tag: "function"
28 },
29 HighlightedRange {
30 range: [49; 52),
31 tag: "text"
32 },
33 HighlightedRange {
34 range: [58; 61),
35 tag: "keyword"
36 },
37 HighlightedRange {
38 range: [62; 63),
39 tag: "function"
40 },
41 HighlightedRange {
42 range: [65; 68),
43 tag: "text"
44 },
45 HighlightedRange {
46 range: [73; 75),
47 tag: "keyword"
48 },
49 HighlightedRange {
50 range: [76; 79),
51 tag: "function"
52 },
53 HighlightedRange {
54 range: [80; 81),
55 tag: "type"
56 },
57 HighlightedRange {
58 range: [80; 81),
59 tag: "function"
60 },
61 HighlightedRange {
62 range: [88; 89),
63 tag: "type"
64 },
65 HighlightedRange {
66 range: [96; 110),
67 tag: "macro"
68 },
69 HighlightedRange {
70 range: [117; 127),
71 tag: "comment"
72 },
73 HighlightedRange {
74 range: [128; 130),
75 tag: "keyword"
76 },
77 HighlightedRange {
78 range: [131; 135),
79 tag: "function"
80 },
81 HighlightedRange {
82 range: [145; 153),
83 tag: "macro"
84 },
85 HighlightedRange {
86 range: [154; 166),
87 tag: "string"
88 },
89 HighlightedRange {
90 range: [168; 170),
91 tag: "literal"
92 },
93 HighlightedRange {
94 range: [178; 181),
95 tag: "keyword"
96 },
97 HighlightedRange {
98 range: [182; 185),
99 tag: "keyword"
100 },
101 HighlightedRange {
102 range: [186; 189),
103 tag: "macro"
104 },
105 HighlightedRange {
106 range: [197; 200),
107 tag: "macro"
108 },
109 HighlightedRange {
110 range: [192; 195),
111 tag: "text"
112 },
113 HighlightedRange {
114 range: [208; 211),
115 tag: "macro"
116 },
117 HighlightedRange {
118 range: [212; 216),
119 tag: "macro"
120 },
121 HighlightedRange {
122 range: [226; 227),
123 tag: "literal"
124 },
125 HighlightedRange {
126 range: [232; 233),
127 tag: "literal"
128 },
129 HighlightedRange {
130 range: [242; 248),
131 tag: "keyword.unsafe"
132 },
133 HighlightedRange {
134 range: [251; 254),
135 tag: "text"
136 },
137 HighlightedRange {
138 range: [255; 262),
139 tag: "text"
140 },
141 HighlightedRange {
142 range: [263; 264),
143 tag: "literal"
144 }
145 ]
146)
diff --git a/crates/ra_ide_api/src/snapshots/tests__rename_mod.snap b/crates/ra_ide_api/src/snapshots/tests__rename_mod.snap
index 890426db7..431de5c55 100644
--- a/crates/ra_ide_api/src/snapshots/tests__rename_mod.snap
+++ b/crates/ra_ide_api/src/snapshots/tests__rename_mod.snap
@@ -1,8 +1,8 @@
1--- 1---
2created: "2019-01-24T08:39:53.759318522+00:00" 2created: "2019-05-23T22:23:35.215905447Z"
3creator: [email protected] 3creator: [email protected]
4source: crates/ra_ide_api/src/references.rs
4expression: "&source_change" 5expression: "&source_change"
5source: crates/ra_ide_api/src/rename.rs
6--- 6---
7Some( 7Some(
8 SourceChange { 8 SourceChange {
@@ -10,29 +10,29 @@ Some(
10 source_file_edits: [ 10 source_file_edits: [
11 SourceFileEdit { 11 SourceFileEdit {
12 file_id: FileId( 12 file_id: FileId(
13 2 13 2,
14 ), 14 ),
15 edit: TextEdit { 15 edit: TextEdit {
16 atoms: [ 16 atoms: [
17 AtomTextEdit { 17 AtomTextEdit {
18 delete: [4; 7), 18 delete: [4; 7),
19 insert: "foo2" 19 insert: "foo2",
20 } 20 },
21 ] 21 ],
22 } 22 },
23 } 23 },
24 ], 24 ],
25 file_system_edits: [ 25 file_system_edits: [
26 MoveFile { 26 MoveFile {
27 src: FileId( 27 src: FileId(
28 3 28 3,
29 ), 29 ),
30 dst_source_root: SourceRootId( 30 dst_source_root: SourceRootId(
31 0 31 0,
32 ), 32 ),
33 dst_path: "bar/foo2.rs" 33 dst_path: "bar/foo2.rs",
34 } 34 },
35 ], 35 ],
36 cursor_position: None 36 cursor_position: None,
37 } 37 },
38) 38)
diff --git a/crates/ra_ide_api/src/snapshots/tests__rename_mod_in_dir.snap b/crates/ra_ide_api/src/snapshots/tests__rename_mod_in_dir.snap
index e96bf5c02..aaff9b4b5 100644
--- a/crates/ra_ide_api/src/snapshots/tests__rename_mod_in_dir.snap
+++ b/crates/ra_ide_api/src/snapshots/tests__rename_mod_in_dir.snap
@@ -1,8 +1,8 @@
1--- 1---
2created: "2019-01-22T14:45:00.975229300+00:00" 2created: "2019-05-23T22:23:35.213830371Z"
3creator: [email protected] 3creator: [email protected]
4source: crates/ra_ide_api/src/references.rs
4expression: "&source_change" 5expression: "&source_change"
5source: "crates\\ra_ide_api\\src\\rename.rs"
6--- 6---
7Some( 7Some(
8 SourceChange { 8 SourceChange {
@@ -10,29 +10,29 @@ Some(
10 source_file_edits: [ 10 source_file_edits: [
11 SourceFileEdit { 11 SourceFileEdit {
12 file_id: FileId( 12 file_id: FileId(
13 1 13 1,
14 ), 14 ),
15 edit: TextEdit { 15 edit: TextEdit {
16 atoms: [ 16 atoms: [
17 AtomTextEdit { 17 AtomTextEdit {
18 delete: [4; 7), 18 delete: [4; 7),
19 insert: "foo2" 19 insert: "foo2",
20 } 20 },
21 ] 21 ],
22 } 22 },
23 } 23 },
24 ], 24 ],
25 file_system_edits: [ 25 file_system_edits: [
26 MoveFile { 26 MoveFile {
27 src: FileId( 27 src: FileId(
28 2 28 2,
29 ), 29 ),
30 dst_source_root: SourceRootId( 30 dst_source_root: SourceRootId(
31 0 31 0,
32 ), 32 ),
33 dst_path: "foo2/mod.rs" 33 dst_path: "foo2/mod.rs",
34 } 34 },
35 ], 35 ],
36 cursor_position: None 36 cursor_position: None,
37 } 37 },
38) 38)
diff --git a/crates/ra_ide_api/src/snapshots/tests__runnables.snap b/crates/ra_ide_api/src/snapshots/tests__runnables.snap
index 71bd7a4bd..de2fadd7f 100644
--- a/crates/ra_ide_api/src/snapshots/tests__runnables.snap
+++ b/crates/ra_ide_api/src/snapshots/tests__runnables.snap
@@ -1,24 +1,24 @@
1--- 1---
2created: "2019-01-22T14:45:00.975229300+00:00" 2created: "2019-05-23T22:23:35.217100106Z"
3creator: [email protected] 3creator: [email protected]
4source: crates/ra_ide_api/src/runnables.rs
4expression: "&runnables" 5expression: "&runnables"
5source: "crates\\ra_ide_api\\src\\runnables.rs"
6--- 6---
7[ 7[
8 Runnable { 8 Runnable {
9 range: [1; 21), 9 range: [1; 21),
10 kind: Bin 10 kind: Bin,
11 }, 11 },
12 Runnable { 12 Runnable {
13 range: [22; 46), 13 range: [22; 46),
14 kind: Test { 14 kind: Test {
15 name: "test_foo" 15 name: "test_foo",
16 } 16 },
17 }, 17 },
18 Runnable { 18 Runnable {
19 range: [47; 81), 19 range: [47; 81),
20 kind: Test { 20 kind: Test {
21 name: "test_foo" 21 name: "test_foo",
22 } 22 },
23 } 23 },
24] 24]
diff --git a/crates/ra_ide_api/src/snapshots/tests__runnables_module.snap b/crates/ra_ide_api/src/snapshots/tests__runnables_module.snap
index a28dd8952..23993a97f 100644
--- a/crates/ra_ide_api/src/snapshots/tests__runnables_module.snap
+++ b/crates/ra_ide_api/src/snapshots/tests__runnables_module.snap
@@ -1,20 +1,20 @@
1--- 1---
2created: "2019-01-22T14:45:00.976230700+00:00" 2created: "2019-05-23T22:23:35.219258850Z"
3creator: [email protected] 3creator: [email protected]
4source: crates/ra_ide_api/src/runnables.rs
4expression: "&runnables" 5expression: "&runnables"
5source: "crates\\ra_ide_api\\src\\runnables.rs"
6--- 6---
7[ 7[
8 Runnable { 8 Runnable {
9 range: [1; 59), 9 range: [1; 59),
10 kind: TestMod { 10 kind: TestMod {
11 path: "test_mod" 11 path: "test_mod",
12 } 12 },
13 }, 13 },
14 Runnable { 14 Runnable {
15 range: [28; 57), 15 range: [28; 57),
16 kind: Test { 16 kind: Test {
17 name: "test_foo1" 17 name: "test_foo1",
18 } 18 },
19 } 19 },
20] 20]
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
index 79f07bef9..c516a61df 100644
--- 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
@@ -1,20 +1,20 @@
1--- 1---
2created: "2019-01-22T14:45:00.979218100+00:00" 2created: "2019-05-23T22:23:35.219671663Z"
3creator: [email protected] 3creator: [email protected]
4source: crates/ra_ide_api/src/runnables.rs
4expression: "&runnables" 5expression: "&runnables"
5source: "crates\\ra_ide_api\\src\\runnables.rs"
6--- 6---
7[ 7[
8 Runnable { 8 Runnable {
9 range: [41; 115), 9 range: [41; 115),
10 kind: TestMod { 10 kind: TestMod {
11 path: "foo::bar::test_mod" 11 path: "foo::bar::test_mod",
12 } 12 },
13 }, 13 },
14 Runnable { 14 Runnable {
15 range: [68; 105), 15 range: [68; 105),
16 kind: Test { 16 kind: Test {
17 name: "test_foo1" 17 name: "test_foo1",
18 } 18 },
19 } 19 },
20] 20]
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
index d199e9073..b02e6707e 100644
--- 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
@@ -1,20 +1,20 @@
1--- 1---
2created: "2019-01-22T14:45:01.016119500+00:00" 2created: "2019-05-23T22:23:35.224315047Z"
3creator: [email protected] 3creator: [email protected]
4source: crates/ra_ide_api/src/runnables.rs
4expression: "&runnables" 5expression: "&runnables"
5source: "crates\\ra_ide_api\\src\\runnables.rs"
6--- 6---
7[ 7[
8 Runnable { 8 Runnable {
9 range: [23; 85), 9 range: [23; 85),
10 kind: TestMod { 10 kind: TestMod {
11 path: "foo::test_mod" 11 path: "foo::test_mod",
12 } 12 },
13 }, 13 },
14 Runnable { 14 Runnable {
15 range: [46; 79), 15 range: [46; 79),
16 kind: Test { 16 kind: Test {
17 name: "test_foo1" 17 name: "test_foo1",
18 } 18 },
19 } 19 },
20] 20]