yum-mirror/slang

Making it easier to work with shaders

git clone https://git.yummers.dev/yum-mirror/slang

Yong HeLanguage server: sort completion candidate by relevance. (#7626)3865a6596

master
388 B19 linesraw
1//TEST:LANG_SERVER(filecheck=CHECK):
2
3// Test that completion candidates are sorted according to context.
4
5enum Fruit { Orange, Apple, Banana }
6enum Color { Red, Green, Blue }
7void expect(Fruit e) {}
8void expect(Color e) {}
9
10
11void test()
12{
13//COMPLETE:14,12
14    expect(); // should list `Fruit` and `Color` first.
15
16}
17
18// CHECK: Fruit:{{.*}}sort(0:Fruit)
19// CHECK: Color:{{.*}}sort(0:Color)