Skip to content

Commit a81712b

Browse files
committed
Update lsif_contains_generated_constant
1 parent 9462322 commit a81712b

File tree

1 file changed

+80
-76
lines changed
  • crates/rust-analyzer/tests/slow-tests

1 file changed

+80
-76
lines changed

crates/rust-analyzer/tests/slow-tests/cli.rs

+80-76
Original file line numberDiff line numberDiff line change
@@ -43,89 +43,93 @@ mod tests {
4343
expect![[r#"
4444
{"id":2,"type":"vertex","label":"foldingRangeResult","result":[{"startLine":2,"startCharacter":43,"endLine":6,"endCharacter":1},{"startLine":3,"startCharacter":19,"endLine":5,"endCharacter":5},{"startLine":9,"startCharacter":10,"endLine":12,"endCharacter":1}]}
4545
{"id":3,"type":"edge","label":"textDocument/foldingRange","inV":2,"outV":1}
46-
{"id":4,"type":"vertex","label":"range","start":{"line":0,"character":3},"end":{"line":0,"character":8}}
46+
{"id":4,"type":"vertex","label":"range","start":{"line":0,"character":0},"end":{"line":13,"character":0}}
4747
{"id":5,"type":"vertex","label":"resultSet"}
4848
{"id":6,"type":"edge","label":"next","inV":5,"outV":4}
49-
{"id":7,"type":"vertex","label":"range","start":{"line":2,"character":13},"end":{"line":2,"character":43}}
49+
{"id":7,"type":"vertex","label":"range","start":{"line":0,"character":3},"end":{"line":0,"character":8}}
5050
{"id":8,"type":"vertex","label":"resultSet"}
5151
{"id":9,"type":"edge","label":"next","inV":8,"outV":7}
52-
{"id":10,"type":"vertex","label":"range","start":{"line":8,"character":0},"end":{"line":8,"character":30}}
53-
{"id":11,"type":"edge","label":"next","inV":8,"outV":10}
54-
{"id":12,"type":"vertex","label":"range","start":{"line":8,"character":32},"end":{"line":8,"character":39}}
55-
{"id":13,"type":"vertex","label":"resultSet"}
56-
{"id":14,"type":"edge","label":"next","inV":13,"outV":12}
57-
{"id":15,"type":"vertex","label":"range","start":{"line":9,"character":4},"end":{"line":9,"character":9}}
52+
{"id":10,"type":"vertex","label":"range","start":{"line":2,"character":13},"end":{"line":2,"character":43}}
53+
{"id":11,"type":"vertex","label":"resultSet"}
54+
{"id":12,"type":"edge","label":"next","inV":11,"outV":10}
55+
{"id":13,"type":"vertex","label":"range","start":{"line":8,"character":0},"end":{"line":8,"character":30}}
56+
{"id":14,"type":"edge","label":"next","inV":11,"outV":13}
57+
{"id":15,"type":"vertex","label":"range","start":{"line":8,"character":32},"end":{"line":8,"character":39}}
5858
{"id":16,"type":"vertex","label":"resultSet"}
5959
{"id":17,"type":"edge","label":"next","inV":16,"outV":15}
60-
{"id":18,"type":"vertex","label":"range","start":{"line":10,"character":8},"end":{"line":10,"character":13}}
60+
{"id":18,"type":"vertex","label":"range","start":{"line":9,"character":4},"end":{"line":9,"character":9}}
6161
{"id":19,"type":"vertex","label":"resultSet"}
6262
{"id":20,"type":"edge","label":"next","inV":19,"outV":18}
63-
{"id":21,"type":"vertex","label":"range","start":{"line":11,"character":4},"end":{"line":11,"character":34}}
64-
{"id":22,"type":"edge","label":"next","inV":8,"outV":21}
65-
{"id":23,"type":"vertex","label":"range","start":{"line":11,"character":36},"end":{"line":11,"character":43}}
66-
{"id":24,"type":"vertex","label":"resultSet"}
67-
{"id":25,"type":"edge","label":"next","inV":24,"outV":23}
68-
{"id":26,"type":"edge","label":"contains","inVs":[4,7,10,12,15,18,21,23],"outV":1}
69-
{"id":27,"type":"vertex","label":"hoverResult","result":{"contents":{"kind":"markdown","value":"\n```rust\n#[allow]\n```\n\n---\n\nValid forms are:\n\n* \\#\\[allow(lint1, lint2, ..., /\\*opt\\*/ reason = \"...\")\\]"}}}
70-
{"id":28,"type":"edge","label":"textDocument/hover","inV":27,"outV":5}
71-
{"id":29,"type":"vertex","label":"referenceResult"}
72-
{"id":30,"type":"edge","label":"textDocument/references","inV":29,"outV":5}
73-
{"id":31,"type":"edge","label":"item","document":1,"property":"references","inVs":[4],"outV":29}
74-
{"id":32,"type":"vertex","label":"hoverResult","result":{"contents":{"kind":"markdown","value":"\n```rust\nfoo\n```\n\n```rust\nmacro_rules! generate_const_from_identifier\n```"}}}
75-
{"id":33,"type":"edge","label":"textDocument/hover","inV":32,"outV":8}
76-
{"id":34,"type":"vertex","label":"packageInformation","name":"foo","manager":"cargo","version":"0.0.0"}
77-
{"id":35,"type":"vertex","label":"moniker","scheme":"rust-analyzer","identifier":"foo::generate_const_from_identifier","unique":"scheme","kind":"export"}
78-
{"id":36,"type":"edge","label":"packageInformation","inV":34,"outV":35}
79-
{"id":37,"type":"edge","label":"moniker","inV":35,"outV":8}
80-
{"id":38,"type":"vertex","label":"definitionResult"}
81-
{"id":39,"type":"edge","label":"item","document":1,"inVs":[7],"outV":38}
82-
{"id":40,"type":"edge","label":"textDocument/definition","inV":38,"outV":8}
83-
{"id":41,"type":"vertex","label":"referenceResult"}
84-
{"id":42,"type":"edge","label":"textDocument/references","inV":41,"outV":8}
85-
{"id":43,"type":"edge","label":"item","document":1,"property":"definitions","inVs":[7],"outV":41}
86-
{"id":44,"type":"edge","label":"item","document":1,"property":"references","inVs":[10,21],"outV":41}
87-
{"id":45,"type":"vertex","label":"hoverResult","result":{"contents":{"kind":"markdown","value":"\n```rust\nfoo\n```\n\n```rust\nconst REQ_001: &str = \"encoded_data\"\n```"}}}
88-
{"id":46,"type":"edge","label":"textDocument/hover","inV":45,"outV":13}
89-
{"id":47,"type":"vertex","label":"moniker","scheme":"rust-analyzer","identifier":"foo::REQ_001","unique":"scheme","kind":"export"}
90-
{"id":48,"type":"edge","label":"packageInformation","inV":34,"outV":47}
91-
{"id":49,"type":"edge","label":"moniker","inV":47,"outV":13}
92-
{"id":50,"type":"vertex","label":"definitionResult"}
93-
{"id":51,"type":"edge","label":"item","document":1,"inVs":[12],"outV":50}
94-
{"id":52,"type":"edge","label":"textDocument/definition","inV":50,"outV":13}
95-
{"id":53,"type":"vertex","label":"referenceResult"}
96-
{"id":54,"type":"edge","label":"textDocument/references","inV":53,"outV":13}
97-
{"id":55,"type":"edge","label":"item","document":1,"property":"definitions","inVs":[12],"outV":53}
98-
{"id":56,"type":"vertex","label":"hoverResult","result":{"contents":{"kind":"markdown","value":"\n```rust\nfoo\n```\n\n```rust\nmod tests\n```"}}}
99-
{"id":57,"type":"edge","label":"textDocument/hover","inV":56,"outV":16}
100-
{"id":58,"type":"vertex","label":"moniker","scheme":"rust-analyzer","identifier":"foo::tests","unique":"scheme","kind":"export"}
101-
{"id":59,"type":"edge","label":"packageInformation","inV":34,"outV":58}
102-
{"id":60,"type":"edge","label":"moniker","inV":58,"outV":16}
103-
{"id":61,"type":"vertex","label":"definitionResult"}
104-
{"id":62,"type":"edge","label":"item","document":1,"inVs":[15],"outV":61}
105-
{"id":63,"type":"edge","label":"textDocument/definition","inV":61,"outV":16}
106-
{"id":64,"type":"vertex","label":"referenceResult"}
107-
{"id":65,"type":"edge","label":"textDocument/references","inV":64,"outV":16}
108-
{"id":66,"type":"edge","label":"item","document":1,"property":"definitions","inVs":[15],"outV":64}
109-
{"id":67,"type":"vertex","label":"hoverResult","result":{"contents":{"kind":"markdown","value":"\n```rust\nextern crate foo\n```"}}}
110-
{"id":68,"type":"edge","label":"textDocument/hover","inV":67,"outV":19}
111-
{"id":69,"type":"vertex","label":"definitionResult"}
112-
{"id":70,"type":"vertex","label":"range","start":{"line":0,"character":0},"end":{"line":13,"character":0}}
113-
{"id":71,"type":"edge","label":"contains","inVs":[70],"outV":1}
114-
{"id":72,"type":"edge","label":"item","document":1,"inVs":[70],"outV":69}
115-
{"id":73,"type":"edge","label":"textDocument/definition","inV":69,"outV":19}
116-
{"id":74,"type":"vertex","label":"referenceResult"}
117-
{"id":75,"type":"edge","label":"textDocument/references","inV":74,"outV":19}
118-
{"id":76,"type":"edge","label":"item","document":1,"property":"references","inVs":[18],"outV":74}
119-
{"id":77,"type":"vertex","label":"hoverResult","result":{"contents":{"kind":"markdown","value":"\n```rust\nfoo::tests\n```\n\n```rust\nconst REQ_002: &str = \"encoded_data\"\n```"}}}
120-
{"id":78,"type":"edge","label":"textDocument/hover","inV":77,"outV":24}
121-
{"id":79,"type":"vertex","label":"moniker","scheme":"rust-analyzer","identifier":"foo::tests::REQ_002","unique":"scheme","kind":"export"}
122-
{"id":80,"type":"edge","label":"packageInformation","inV":34,"outV":79}
123-
{"id":81,"type":"edge","label":"moniker","inV":79,"outV":24}
124-
{"id":82,"type":"vertex","label":"definitionResult"}
125-
{"id":83,"type":"edge","label":"item","document":1,"inVs":[23],"outV":82}
126-
{"id":84,"type":"edge","label":"textDocument/definition","inV":82,"outV":24}
127-
{"id":85,"type":"vertex","label":"referenceResult"}
128-
{"id":86,"type":"edge","label":"textDocument/references","inV":85,"outV":24}
129-
{"id":87,"type":"edge","label":"item","document":1,"property":"definitions","inVs":[23],"outV":85}
63+
{"id":21,"type":"vertex","label":"range","start":{"line":10,"character":8},"end":{"line":10,"character":13}}
64+
{"id":22,"type":"edge","label":"next","inV":5,"outV":21}
65+
{"id":23,"type":"vertex","label":"range","start":{"line":11,"character":4},"end":{"line":11,"character":34}}
66+
{"id":24,"type":"edge","label":"next","inV":11,"outV":23}
67+
{"id":25,"type":"vertex","label":"range","start":{"line":11,"character":36},"end":{"line":11,"character":43}}
68+
{"id":26,"type":"vertex","label":"resultSet"}
69+
{"id":27,"type":"edge","label":"next","inV":26,"outV":25}
70+
{"id":28,"type":"edge","label":"contains","inVs":[4,7,10,13,15,18,21,23,25],"outV":1}
71+
{"id":29,"type":"vertex","label":"hoverResult","result":{"contents":{"kind":"markdown","value":"\n```rust\nextern crate foo\n```"}}}
72+
{"id":30,"type":"edge","label":"textDocument/hover","inV":29,"outV":5}
73+
{"id":31,"type":"vertex","label":"packageInformation","name":"foo","manager":"cargo","version":"0.0.0"}
74+
{"id":32,"type":"vertex","label":"moniker","scheme":"rust-analyzer","identifier":"foo::crate","unique":"scheme","kind":"export"}
75+
{"id":33,"type":"edge","label":"packageInformation","inV":31,"outV":32}
76+
{"id":34,"type":"edge","label":"moniker","inV":32,"outV":5}
77+
{"id":35,"type":"vertex","label":"definitionResult"}
78+
{"id":36,"type":"edge","label":"item","document":1,"inVs":[4],"outV":35}
79+
{"id":37,"type":"edge","label":"textDocument/definition","inV":35,"outV":5}
80+
{"id":38,"type":"vertex","label":"referenceResult"}
81+
{"id":39,"type":"edge","label":"textDocument/references","inV":38,"outV":5}
82+
{"id":40,"type":"edge","label":"item","document":1,"property":"definitions","inVs":[4],"outV":38}
83+
{"id":41,"type":"edge","label":"item","document":1,"property":"references","inVs":[21],"outV":38}
84+
{"id":42,"type":"vertex","label":"hoverResult","result":{"contents":{"kind":"markdown","value":"\n```rust\n#[allow]\n```\n\n---\n\nValid forms are:\n\n* \\#\\[allow(lint1, lint2, ..., /\\*opt\\*/ reason = \"...\")\\]"}}}
85+
{"id":43,"type":"edge","label":"textDocument/hover","inV":42,"outV":8}
86+
{"id":44,"type":"vertex","label":"referenceResult"}
87+
{"id":45,"type":"edge","label":"textDocument/references","inV":44,"outV":8}
88+
{"id":46,"type":"edge","label":"item","document":1,"property":"references","inVs":[7],"outV":44}
89+
{"id":47,"type":"vertex","label":"hoverResult","result":{"contents":{"kind":"markdown","value":"\n```rust\nfoo\n```\n\n```rust\nmacro_rules! generate_const_from_identifier\n```"}}}
90+
{"id":48,"type":"edge","label":"textDocument/hover","inV":47,"outV":11}
91+
{"id":49,"type":"vertex","label":"moniker","scheme":"rust-analyzer","identifier":"foo::generate_const_from_identifier","unique":"scheme","kind":"export"}
92+
{"id":50,"type":"edge","label":"packageInformation","inV":31,"outV":49}
93+
{"id":51,"type":"edge","label":"moniker","inV":49,"outV":11}
94+
{"id":52,"type":"vertex","label":"definitionResult"}
95+
{"id":53,"type":"edge","label":"item","document":1,"inVs":[10],"outV":52}
96+
{"id":54,"type":"edge","label":"textDocument/definition","inV":52,"outV":11}
97+
{"id":55,"type":"vertex","label":"referenceResult"}
98+
{"id":56,"type":"edge","label":"textDocument/references","inV":55,"outV":11}
99+
{"id":57,"type":"edge","label":"item","document":1,"property":"definitions","inVs":[10],"outV":55}
100+
{"id":58,"type":"edge","label":"item","document":1,"property":"references","inVs":[13,23],"outV":55}
101+
{"id":59,"type":"vertex","label":"hoverResult","result":{"contents":{"kind":"markdown","value":"\n```rust\nfoo\n```\n\n```rust\nconst REQ_001: &str = \"encoded_data\"\n```"}}}
102+
{"id":60,"type":"edge","label":"textDocument/hover","inV":59,"outV":16}
103+
{"id":61,"type":"vertex","label":"moniker","scheme":"rust-analyzer","identifier":"foo::REQ_001","unique":"scheme","kind":"export"}
104+
{"id":62,"type":"edge","label":"packageInformation","inV":31,"outV":61}
105+
{"id":63,"type":"edge","label":"moniker","inV":61,"outV":16}
106+
{"id":64,"type":"vertex","label":"definitionResult"}
107+
{"id":65,"type":"edge","label":"item","document":1,"inVs":[15],"outV":64}
108+
{"id":66,"type":"edge","label":"textDocument/definition","inV":64,"outV":16}
109+
{"id":67,"type":"vertex","label":"referenceResult"}
110+
{"id":68,"type":"edge","label":"textDocument/references","inV":67,"outV":16}
111+
{"id":69,"type":"edge","label":"item","document":1,"property":"definitions","inVs":[15],"outV":67}
112+
{"id":70,"type":"vertex","label":"hoverResult","result":{"contents":{"kind":"markdown","value":"\n```rust\nfoo\n```\n\n```rust\nmod tests\n```"}}}
113+
{"id":71,"type":"edge","label":"textDocument/hover","inV":70,"outV":19}
114+
{"id":72,"type":"vertex","label":"moniker","scheme":"rust-analyzer","identifier":"foo::tests","unique":"scheme","kind":"export"}
115+
{"id":73,"type":"edge","label":"packageInformation","inV":31,"outV":72}
116+
{"id":74,"type":"edge","label":"moniker","inV":72,"outV":19}
117+
{"id":75,"type":"vertex","label":"definitionResult"}
118+
{"id":76,"type":"edge","label":"item","document":1,"inVs":[18],"outV":75}
119+
{"id":77,"type":"edge","label":"textDocument/definition","inV":75,"outV":19}
120+
{"id":78,"type":"vertex","label":"referenceResult"}
121+
{"id":79,"type":"edge","label":"textDocument/references","inV":78,"outV":19}
122+
{"id":80,"type":"edge","label":"item","document":1,"property":"definitions","inVs":[18],"outV":78}
123+
{"id":81,"type":"vertex","label":"hoverResult","result":{"contents":{"kind":"markdown","value":"\n```rust\nfoo::tests\n```\n\n```rust\nconst REQ_002: &str = \"encoded_data\"\n```"}}}
124+
{"id":82,"type":"edge","label":"textDocument/hover","inV":81,"outV":26}
125+
{"id":83,"type":"vertex","label":"moniker","scheme":"rust-analyzer","identifier":"foo::tests::REQ_002","unique":"scheme","kind":"export"}
126+
{"id":84,"type":"edge","label":"packageInformation","inV":31,"outV":83}
127+
{"id":85,"type":"edge","label":"moniker","inV":83,"outV":26}
128+
{"id":86,"type":"vertex","label":"definitionResult"}
129+
{"id":87,"type":"edge","label":"item","document":1,"inVs":[25],"outV":86}
130+
{"id":88,"type":"edge","label":"textDocument/definition","inV":86,"outV":26}
131+
{"id":89,"type":"vertex","label":"referenceResult"}
132+
{"id":90,"type":"edge","label":"textDocument/references","inV":89,"outV":26}
133+
{"id":91,"type":"edge","label":"item","document":1,"property":"definitions","inVs":[25],"outV":89}
130134
"#]].assert_eq(stdout);
131135
}

0 commit comments

Comments
 (0)