Skip to content

Commit 8615904

Browse files
committed
SR-13490: fix tests to align with new import sorting algorithm
1 parent f18f3da commit 8615904

File tree

3 files changed

+17
-17
lines changed

3 files changed

+17
-17
lines changed

test/IDE/print_ast_overlay.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,6 @@ public class FooOverlayClassDerived : FooOverlayClassBase {
4141

4242
// PASS_NO_INTERNAL-NOT: overlay_func_internal
4343

44-
// PASS_ANNOTATED: <decl:Import>@_exported import <ref:module>Foo</ref>.<ref:module>FooSub</ref></decl>
4544
// PASS_ANNOTATED: <decl:Import>@_exported import <ref:module>Foo</ref></decl>
45+
// PASS_ANNOTATED: <decl:Import>@_exported import <ref:module>Foo</ref>.<ref:module>FooSub</ref></decl>
4646
// PASS_ANNOTATED: <decl:Import>@_exported import <ref:module>FooHelper</ref></decl>

test/SourceKit/InterfaceGen/gen_clang_module.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,21 +73,21 @@ var x: FooClassBase
7373

7474
// RUN: %sourcekitd-test -req=interface-gen-open -module Foo -- -I %t.overlays -F %S/../Inputs/libIDE-mock-sdk \
7575
// RUN: -target %target-triple %clang-importer-sdk-nosource -I %t \
76-
// RUN: == -req=cursor -pos=1:8 == -req=cursor -pos=1:12 \
77-
// RUN: == -req=cursor -pos=2:10 \
78-
// RUN: == -req=cursor -pos=3:10 | %FileCheck -check-prefix=CHECK-IMPORT %s
76+
// RUN: == -req=cursor -pos=1:8 \
77+
// RUN: == -req=cursor -pos=2:8 == -req=cursor -pos=2:12 \
78+
// RUN: == -req=cursor -pos=3:8 | %FileCheck -check-prefix=CHECK-IMPORT %s
7979
// The cursors point to module names inside the imports, see 'gen_clang_module.swift.response'
8080

8181
// CHECK-IMPORT: source.lang.swift.ref.module ()
8282
// CHECK-IMPORT-NEXT: Foo{{$}}
8383
// CHECK-IMPORT-NEXT: Foo{{$}}
8484
// CHECK-IMPORT: source.lang.swift.ref.module ()
85-
// CHECK-IMPORT-NEXT: FooSub{{$}}
86-
// CHECK-IMPORT-NEXT: Foo.FooSub{{$}}
87-
// CHECK-IMPORT: source.lang.swift.ref.module ()
8885
// CHECK-IMPORT-NEXT: Foo{{$}}
8986
// CHECK-IMPORT-NEXT: Foo{{$}}
9087
// CHECK-IMPORT: source.lang.swift.ref.module ()
88+
// CHECK-IMPORT-NEXT: FooSub{{$}}
89+
// CHECK-IMPORT-NEXT: Foo.FooSub{{$}}
90+
// CHECK-IMPORT: source.lang.swift.ref.module ()
9191
// CHECK-IMPORT-NEXT: FooHelper{{$}}
9292
// CHECK-IMPORT-NEXT: FooHelper{{$}}
9393

test/SourceKit/InterfaceGen/gen_clang_module.swift.response

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import Foo.FooSub
21
import Foo
2+
import Foo.FooSub
33
import FooHelper
44
import SwiftOnoneSupport
55

@@ -370,19 +370,19 @@ public class FooOverlayClassDerived : Foo.FooOverlayClassBase {
370370
key.length: 3
371371
},
372372
{
373-
key.kind: source.lang.swift.syntaxtype.identifier,
373+
key.kind: source.lang.swift.syntaxtype.keyword,
374374
key.offset: 11,
375375
key.length: 6
376376
},
377377
{
378-
key.kind: source.lang.swift.syntaxtype.keyword,
378+
key.kind: source.lang.swift.syntaxtype.identifier,
379379
key.offset: 18,
380-
key.length: 6
380+
key.length: 3
381381
},
382382
{
383383
key.kind: source.lang.swift.syntaxtype.identifier,
384-
key.offset: 25,
385-
key.length: 3
384+
key.offset: 22,
385+
key.length: 6
386386
},
387387
{
388388
key.kind: source.lang.swift.syntaxtype.keyword,
@@ -3608,13 +3608,13 @@ public class FooOverlayClassDerived : Foo.FooOverlayClassBase {
36083608
},
36093609
{
36103610
key.kind: source.lang.swift.ref.module,
3611-
key.offset: 11,
3612-
key.length: 6
3611+
key.offset: 18,
3612+
key.length: 3
36133613
},
36143614
{
36153615
key.kind: source.lang.swift.ref.module,
3616-
key.offset: 25,
3617-
key.length: 3
3616+
key.offset: 22,
3617+
key.length: 6
36183618
},
36193619
{
36203620
key.kind: source.lang.swift.ref.module,

0 commit comments

Comments
 (0)