forked from swiftlang/swift
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IDE] make replace.bodies.with.fatalError an internal refactoring.
This shouldn't be exposed to general users.
- Loading branch information
Showing
3 changed files
with
31 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
test/refactoring/ReplaceBodiesWithFatalError/requires-env-var.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
var bar: Int { | ||
return 0 | ||
} | ||
// CHECK-NO-ENV-LABEL: Action begins | ||
// CHECK-NO-ENV-NEXT: Action ends | ||
|
||
// CHECK-ENV-LABEL: Action begins | ||
// CHECK-ENV-NEXT: Replace Function Bodies With 'fatalError()' | ||
// CHECK-ENV-NEXT: Action ends | ||
|
||
// replace.bodies.with.fatalError/-replace-bodies-with-fatalError should only be | ||
// found if the appropriate environment variable is set. | ||
|
||
// RUN: %refactor -actions -source-filename %s -pos=1:1 -end-pos=3:2 | %FileCheck %s -check-prefix CHECK-NO-ENV | ||
|
||
// RUN: env SWIFT_ENABLE_INTERNAL_REFACTORING_ACTIONS=1 %refactor -actions -source-filename %s -pos=1:1 -end-pos=3:2 | %FileCheck %s -check-prefix CHECK-ENV |