|
1 |
| -// We need to require macOS because swiftSyntax currently doesn't build on Linux |
2 |
| -// REQUIRES: OS=macosx |
3 | 1 | // RUN: %target-swift-ide-test -syntax-coloring -source-filename %s | %FileCheck %s
|
4 |
| -// RUN: %target-swift-ide-test -syntax-coloring -typecheck -source-filename %s | %FileCheck %s -check-prefixes CHECK,CHECK-OLD |
5 |
| -// RUN: %swift-swiftsyntax-test -classify-syntax -source-file %s | %FileCheck %s --check-prefixes CHECK,CHECK-NEW |
| 2 | +// RUN: %target-swift-ide-test -syntax-coloring -typecheck -source-filename %s | %FileCheck %s |
6 | 3 | // XFAIL: broken_std_regex
|
7 | 4 |
|
8 | 5 | enum List<T> {
|
9 | 6 | case Nil
|
10 | 7 | // rdar://21927124
|
11 |
| - // CHECK-OLD: <attr-builtin>indirect</attr-builtin> <kw>case</kw> Cons(T, List) |
12 |
| - // CHECK-NEW: <attr-builtin>indirect</attr-builtin> <kw>case</kw> Cons(<type>T</type>, <type>List</type>) |
| 8 | + // CHECK: <attr-builtin>indirect</attr-builtin> <kw>case</kw> Cons(T, List) |
13 | 9 | indirect case Cons(T, List)
|
14 | 10 | }
|
15 | 11 |
|
@@ -85,8 +81,7 @@ class Attributes {
|
85 | 81 | // CHECK: <attr-builtin>@IBOutlet</attr-builtin> <kw>var</kw> v0: <type>Int</type>
|
86 | 82 | @IBOutlet var v0: Int
|
87 | 83 |
|
88 |
| -// CHECK-OLD: <attr-builtin>@IBOutlet</attr-builtin> <attr-id>@IBOutlet</attr-id> <kw>var</kw> v1: <type>String</type> |
89 |
| -// CHECK-NEW: <attr-builtin>@IBOutlet</attr-builtin> <attr-builtin>@IBOutlet</attr-builtin> <kw>var</kw> v1: <type>String</type> |
| 84 | +// CHECK: <attr-builtin>@IBOutlet</attr-builtin> <attr-id>@IBOutlet</attr-id> <kw>var</kw> v1: <type>String</type> |
90 | 85 | @IBOutlet @IBOutlet var v1: String
|
91 | 86 |
|
92 | 87 | // CHECK: <attr-builtin>@objc</attr-builtin> <attr-builtin>@IBOutlet</attr-builtin> <kw>var</kw> v2: <type>String</type>
|
@@ -239,8 +234,7 @@ func f(x: Int) -> Int {
|
239 | 234 | )
|
240 | 235 | """
|
241 | 236 |
|
242 |
| - // CHECK-OLD: <str>"</str>\<anchor>(</anchor><int>1</int><anchor>)</anchor>\<anchor>(</anchor><int>1</int><anchor>)</anchor><str>"</str> |
243 |
| - // CHECK-NEW: <str>"</str>\<anchor>(</anchor><int>1</int><anchor>)</anchor><str></str>\<anchor>(</anchor><int>1</int><anchor>)</anchor><str>"</str> |
| 237 | + // CHECK: <str>"</str>\<anchor>(</anchor><int>1</int><anchor>)</anchor>\<anchor>(</anchor><int>1</int><anchor>)</anchor><str>"</str> |
244 | 238 | "\(1)\(1)"
|
245 | 239 | }
|
246 | 240 |
|
@@ -330,17 +324,13 @@ func funcTakingIn(in internalName: Int) {}
|
330 | 324 | _ = 123
|
331 | 325 | // CHECK: <int>123</int>
|
332 | 326 | _ = -123
|
333 |
| -// CHECK-OLD: <int>-123</int> |
334 |
| -// CHECK-NEW: -<int>123</int> |
| 327 | +// CHECK: <int>-123</int> |
335 | 328 | _ = -1
|
336 |
| -// CHECK-OLD: <int>-1</int> |
337 |
| -// CHECK-NEW: -<int>1</int> |
| 329 | +// CHECK: <int>-1</int> |
338 | 330 | _ = -0x123
|
339 |
| -// CHECK-OLD: <int>-0x123</int> |
340 |
| -// CHECK-NEW: -<int>0x123</int> |
| 331 | +// CHECK: <int>-0x123</int> |
341 | 332 | _ = -3.1e-5
|
342 |
| -// CHECK-OLD: <float>-3.1e-5</float> |
343 |
| -// CHECK-NEW: <float>3.1e-5</float> |
| 333 | +// CHECK: <float>-3.1e-5</float> |
344 | 334 |
|
345 | 335 | "--\"\(x) --"
|
346 | 336 | // CHECK: <str>"--\"</str>\<anchor>(</anchor>x<anchor>)</anchor><str> --"</str>
|
@@ -397,15 +387,12 @@ class Ownership {
|
397 | 387 | weak var w
|
398 | 388 | // CHECK: <attr-builtin>unowned</attr-builtin> <kw>var</kw> u
|
399 | 389 | unowned var u
|
400 |
| - // CHECK-OLD: <attr-builtin>unowned(unsafe)</attr-builtin> <kw>var</kw> uu |
401 |
| - // CHECK-NEW: <attr-builtin>unowned</attr-builtin>(unsafe) <kw>var</kw> uu |
| 390 | + // CHECK: <attr-builtin>unowned(unsafe)</attr-builtin> <kw>var</kw> uu |
402 | 391 | unowned(unsafe) var uu
|
403 | 392 | }
|
404 |
| -// CHECK-OLD: <kw>let</kw> closure = { [<attr-builtin>weak</attr-builtin> x=bindtox, <attr-builtin>unowned</attr-builtin> y=bindtoy, <attr-builtin>unowned(unsafe)</attr-builtin> z=bindtoz] <kw>in</kw> } |
405 |
| -// FIXME: CHECK-NEW: <kw>let</kw> closure = { [weak x=bindtox, unowned y=bindtoy, unowned(unsafe) z=bindtoz] <kw>in</kw> } |
| 393 | +// CHECK: <kw>let</kw> closure = { [<attr-builtin>weak</attr-builtin> x=bindtox, <attr-builtin>unowned</attr-builtin> y=bindtoy, <attr-builtin>unowned(unsafe)</attr-builtin> z=bindtoz] <kw>in</kw> } |
406 | 394 | let closure = { [weak x=bindtox, unowned y=bindtoy, unowned(unsafe) z=bindtoz] in }
|
407 | 395 |
|
408 | 396 | protocol FakeClassRestrictedProtocol : `class` {}
|
409 |
| -// CHECK-OLD: <kw>protocol</kw> FakeClassRestrictedProtocol : <type>`class`</type> {} |
| 397 | +// CHECK: <kw>protocol</kw> FakeClassRestrictedProtocol : <type>`class`</type> {} |
410 | 398 | // FIXME: rdar://42801404: OLD and NEW should be the same '<type>`class`</type>'.
|
411 |
| -// CHECK-NEW: <kw>protocol</kw> FakeClassRestrictedProtocol : `<type>class</type>` {} |
0 commit comments