|
5 | 5 | // RUN: %target-swift-ide-test(mock-sdk: %clang-importer-sdk) -code-completion -source-filename %s -code-completion-token=CATCH2 | %FileCheck %s -check-prefix=CATCH2 |
6 | 6 | // RUN: %target-swift-ide-test(mock-sdk: %clang-importer-sdk) -code-completion -source-filename %s -code-completion-token=THROW2 | %FileCheck %s -check-prefix=THROW2 |
7 | 7 | // RUN: %target-swift-ide-test(mock-sdk: %clang-importer-sdk) -code-completion -source-filename %s -code-completion-token=CATCH3 | %FileCheck %s -check-prefix=CATCH3 |
| 8 | +// RUN: %target-swift-ide-test(mock-sdk: %clang-importer-sdk) -code-completion -source-filename %s -code-completion-token=THROW3 | %FileCheck %s -check-prefix=THROW3 |
8 | 9 | // RUN: %target-swift-ide-test(mock-sdk: %clang-importer-sdk) -code-completion -source-filename %s -code-completion-token=TOP_LEVEL_CATCH1 | %FileCheck %s -check-prefix=CATCH1 |
9 | 10 | // RUN: %target-swift-ide-test(mock-sdk: %clang-importer-sdk) -code-completion -source-filename %s -code-completion-token=TOP_LEVEL_THROW1 | %FileCheck %s -check-prefix=THROW1 |
10 | 11 |
|
11 | 12 | // RUN: %target-swift-ide-test(mock-sdk: %clang-importer-sdk) -code-completion -source-filename %s -code-completion-token=TOP_LEVEL_CATCH2 | %FileCheck %s -check-prefix=CATCH2 |
12 | 13 | // RUN: %target-swift-ide-test(mock-sdk: %clang-importer-sdk) -code-completion -source-filename %s -code-completion-token=TOP_LEVEL_THROW2 | %FileCheck %s -check-prefix=THROW2 |
| 14 | +// RUN: %target-swift-ide-test(mock-sdk: %clang-importer-sdk) -code-completion -source-filename %s -code-completion-token=TOP_LEVEL_THROW3 | %FileCheck %s -check-prefix=THROW3 |
13 | 15 |
|
14 | 16 | // RUN: %target-swift-ide-test(mock-sdk: %clang-importer-sdk) -code-completion -source-filename %s -code-completion-token=INSIDE_CATCH1 > %t.inside_catch1 |
15 | 17 | // RUN: %FileCheck %s -check-prefix=STMT < %t.inside_catch1 |
@@ -126,11 +128,20 @@ func test005() { |
126 | 128 | // CATCH3: End completions |
127 | 129 | } |
128 | 130 |
|
| 131 | +func testInvalid() { |
| 132 | + try throw Error4.#^THROW3^# |
| 133 | +// THROW3: Begin completions |
| 134 | +// THROW3: Decl[EnumElement]/CurrNominal: E1[#Error4#]{{; name=.+$}} |
| 135 | +// THROW3: Decl[EnumElement]/CurrNominal: E2({#Int32#})[#Error4#]{{; name=.+$}} |
| 136 | +// THROW3: End completions |
| 137 | +} |
| 138 | + |
129 | 139 | //===--- Top-level throw/catch |
130 | 140 | do {} catch #^TOP_LEVEL_CATCH1^# {} |
131 | 141 | throw #^TOP_LEVEL_THROW1^# |
132 | 142 | do {} catch Error4.#^TOP_LEVEL_CATCH2^# {} |
133 | 143 | throw Error4.#^TOP_LEVEL_THROW2^# |
| 144 | +try throw Error4.#^TOP_LEVEL_THROW3^# |
134 | 145 |
|
135 | 146 | //===--- Inside catch body |
136 | 147 |
|
|
0 commit comments