File tree Expand file tree Collapse file tree 5 files changed +11
-5
lines changed
test/SourceKit/Refactoring Expand file tree Collapse file tree 5 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -350,9 +350,7 @@ bool ide::initCompilerInvocation(
350350 FrontendOpts.IndexStorePath .clear ();
351351 ImporterOpts.IndexStorePath .clear ();
352352
353- // Force the action type to be -typecheck. This affects importing the
354- // SwiftONoneSupport module.
355- FrontendOpts.RequestedAction = FrontendOptions::ActionType::Typecheck;
353+ FrontendOpts.RequestedAction = Action;
356354
357355 // We don't care about LLVMArgs
358356 FrontendOpts.LLVMArgs .clear ();
Original file line number Diff line number Diff line change 11source.edit.kind.active:
22 8:9-8:10 source.refactoring.range.kind.basename
3- source.edit.kind.active :
3+ source.edit.kind.inactive :
44 10:16-10:17 source.refactoring.range.kind.basename
55source.edit.kind.inactive:
66 12:16-12:17 source.refactoring.range.kind.basename
Original file line number Diff line number Diff line change @@ -118,8 +118,15 @@ struct Foo {
118118}
119119
120120// RUN: %empty-directory(%t.result)
121+
122+ // Ensure that a syntactic rename request does not require the stdlib
123+ // RUN: %sourcekitd-test -req=syntactic-rename -rename-spec %S/syntactic-rename/empty.json %s -- -resource-dir /no/stdlib/here
124+
121125// RUN: %sourcekitd-test -req=syntactic-rename -rename-spec %S/syntactic-rename/x.in.json %s >> %t.result/x.expected
122126// RUN: %diff -u %S/syntactic-rename/x.expected %t.result/x.expected
127+
128+ // Note: Even though the #if is true, it is not evaluated since we only parse.
129+ // Thus, both the #if and #else are inactive
123130// RUN: %sourcekitd-test -req=syntactic-rename -rename-spec %S/syntactic-rename/z.in.json %s >> %t.result/z.expected
124131// RUN: %diff -u %S/syntactic-rename/z.expected %t.result/z.expected
125132// RUN: %sourcekitd-test -req=syntactic-rename -rename-spec %S/syntactic-rename/foo.in.json %s >> %t.result/foo_arity1.expected
Original file line number Diff line number Diff line change 1+ []
Original file line number Diff line number Diff line change 11source.edit.kind.active:
22 8:9-8:10 "foo"
3- source.edit.kind.active :
3+ source.edit.kind.inactive :
44 10:16-10:17 "foo"
55source.edit.kind.inactive:
66 12:16-12:17 "foo"
You can’t perform that action at this time.
0 commit comments