@@ -9,23 +9,31 @@ func test() {
9
9
10
10
// XFAIL: broken_std_regex
11
11
// RUN: %sourcekitd-test -req=complete -req-opts=hidelowpriority=0 -pos=7:1 %s -- %s > %t.orig
12
- // RUN: %FileCheck -check-prefix=NAME %s < %t.orig
13
- // Make sure the order is as below, foo(Int) should come before foo(String).
12
+ // RUN: %sourcekitd-test -req=complete -req-opts=hidelowpriority=0,sort.byname=0 -pos=7:1 %s -- %s > %t.orig.off
13
+ // RUN: %FileCheck -check-prefix=NAME_SORTED %s < %t.orig
14
+ // RUN: %FileCheck -check-prefix=NAME_UNSORTED %s < %t.orig.off
15
+ // RUN: not diff -u %t.orig %t.orig.off
14
16
15
- // NAME: key.description: "#column"
16
- // NAME: key.description: "foo(a: Int)"
17
- // NAME-NOT: key.description
18
- // NAME: key.description: "foo(a: String)"
19
- // NAME-NOT: key.description
20
- // NAME: key.description: "foo(b: Int)"
21
- // NAME: key.description: "test()"
22
- // NAME: key.description: "x"
17
+ // Make sure the order is as below, foo(Int) should come before foo(String).
18
+ // NAME_SORTED: key.description: "#column"
19
+ // NAME_SORTED: key.description: "foo(a: Int)"
20
+ // NAME_SORTED-NOT: key.description
21
+ // NAME_SORTED: key.description: "foo(a: String)"
22
+ // NAME_SORTED-NOT: key.description
23
+ // NAME_SORTED: key.description: "foo(b: Int)"
24
+ // NAME_SORTED: key.description: "test()"
25
+ // NAME_SORTED: key.description: "x"
26
+
27
+ // NAME_UNSORTED-DAG: key.description: "x"
28
+ // NAME_UNSORTED-DAG: key.description: "foo(a: String)"
29
+ // NAME_UNSORTED-DAG: key.description: "foo(a: Int)"
30
+ // NAME_UNSORTED-DAG: key.description: "foo(b: Int)"
23
31
24
32
// RUN: %sourcekitd-test -req=complete.open -pos=7:1 -req-opts=hidelowpriority=0,hideunderscores=0 %s -- %s > %t.default
25
33
// RUN: %sourcekitd-test -req=complete.open -pos=7:1 -req-opts=sort.byname=0,hidelowpriority=0,hideunderscores=0 %s -- %s > %t.on
26
34
// RUN: %sourcekitd-test -req=complete.open -pos=7:1 -req-opts=sort.byname=1,hidelowpriority=0,hideunderscores=0 %s -- %s > %t.off
27
35
// RUN: %FileCheck -check-prefix=CONTEXT %s < %t.default
28
- // RUN: %FileCheck -check-prefix=NAME %s < %t.off
36
+ // RUN: %FileCheck -check-prefix=NAME_SORTED %s < %t.off
29
37
// FIXME: rdar://problem/20109989 non-deterministic sort order
30
38
// RUN-disabled: diff %t.on %t.default
31
39
// RUN: %FileCheck -check-prefix=CONTEXT %s < %t.on
0 commit comments