Skip to content

Commit 47f2987

Browse files
committed
Adjust coloring.swift test case to account for more accurate classification of contextual keywords
1 parent 59d6f72 commit 47f2987

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

lit_tests/coloring.swift

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
enum List<T> {
44
case Nil
55
// rdar://21927124
6-
// CHECK: <attr-builtin>indirect</attr-builtin> <kw>case</kw> <id>Cons</id>(<type>T</type>, <type>List</type>)
6+
// CHECK: <kw>indirect</kw> <kw>case</kw> <id>Cons</id>(<type>T</type>, <type>List</type>)
77
indirect case Cons(T, List)
88
}
99

@@ -97,10 +97,10 @@ class Attributes {
9797
// CHECK: <attr-builtin>@IBAction</attr-builtin> <attr-builtin>@available</attr-builtin>(*, <id>unavailable</id>) <kw>func</kw> <id>f3</id>() {}
9898
@IBAction @available(*, unavailable) func f3() {}
9999

100-
// CHECK: <attr-builtin>mutating</attr-builtin> <kw>func</kw> <id>func_mutating_1</id>() {}
100+
// CHECK: <kw>mutating</kw> <kw>func</kw> <id>func_mutating_1</id>() {}
101101
mutating func func_mutating_1() {}
102102

103-
// CHECK: <attr-builtin>nonmutating</attr-builtin> <kw>func</kw> <id>func_mutating_2</id>() {}
103+
// CHECK: <kw>nonmutating</kw> <kw>func</kw> <id>func_mutating_2</id>() {}
104104
nonmutating func func_mutating_2() {}
105105
}
106106

@@ -160,7 +160,7 @@ protocol Prot {
160160
var protocolProperty2: Int { get set }
161161
}
162162

163-
// CHECK: <attr-builtin>infix</attr-builtin> <kw>operator</kw> *-* : <id>FunnyPrecedence</id>{{$}}
163+
// CHECK: <kw>infix</kw> <kw>operator</kw> *-* : <id>FunnyPrecedence</id>{{$}}
164164
infix operator *-* : FunnyPrecedence
165165

166166
// CHECK: <kw>precedencegroup</kw> <id>FunnyPrecedence</id>
@@ -174,13 +174,13 @@ precedencegroup FunnyPrecedence {
174174
// CHECK: <kw>func</kw> *-*(<id>l</id>: <type>Int</type>, <id>r</id>: <type>Int</type>) -> <type>Int</type> { <kw>return</kw> <id>l</id> }{{$}}
175175
func *-*(l: Int, r: Int) -> Int { return l }
176176

177-
// CHECK: <attr-builtin>infix</attr-builtin> <kw>operator</kw> *-+* : <id>FunnyPrecedence</id>
177+
// CHECK: <kw>infix</kw> <kw>operator</kw> *-+* : <id>FunnyPrecedence</id>
178178
infix operator *-+* : FunnyPrecedence
179179

180180
// CHECK: <kw>func</kw> *-+*(<id>l</id>: <type>Int</type>, <id>r</id>: <type>Int</type>) -> <type>Int</type> { <kw>return</kw> <id>l</id> }{{$}}
181181
func *-+*(l: Int, r: Int) -> Int { return l }
182182

183-
// CHECK: <attr-builtin>infix</attr-builtin> <kw>operator</kw> *--*{{$}}
183+
// CHECK: <kw>infix</kw> <kw>operator</kw> *--*{{$}}
184184
infix operator *--*
185185

186186
// CHECK: <kw>func</kw> *--*(<id>l</id>: <type>Int</type>, <id>r</id>: <type>Int</type>) -> <type>Int</type> { <kw>return</kw> <id>l</id> }{{$}}
@@ -283,21 +283,21 @@ func test3(o: AnyObject) {
283283

284284
// CHECK: <kw>class</kw> <id>MySubClass</id> : <type>MyCls</type> {
285285
class MySubClass : MyCls {
286-
// CHECK: <attr-builtin>override</attr-builtin> <kw>func</kw> <id>foo</id>(<id>x</id>: <type>Int</type>) {}
286+
// CHECK: <kw>override</kw> <kw>func</kw> <id>foo</id>(<id>x</id>: <type>Int</type>) {}
287287
override func foo(x: Int) {}
288288

289-
// CHECK: <attr-builtin>convenience</attr-builtin> <kw>init</kw>(<id>a</id>: <type>Int</type>) {}
289+
// CHECK: <kw>convenience</kw> <kw>init</kw>(<id>a</id>: <type>Int</type>) {}
290290
convenience init(a: Int) {}
291291
}
292292

293293
// CHECK: <kw>var</kw> <id>g1</id> = { (<id>x</id>: <type>Int</type>) -> <type>Int</type> <kw>in</kw> <kw>return</kw> <int>0</int> }
294294
var g1 = { (x: Int) -> Int in return 0 }
295295

296-
// CHECK: <attr-builtin>infix</attr-builtin> <kw>operator</kw> ~~ {
296+
// CHECK: <kw>infix</kw> <kw>operator</kw> ~~ {
297297
infix operator ~~ {}
298-
// CHECK: <attr-builtin>prefix</attr-builtin> <kw>operator</kw> *~~ {
298+
// CHECK: <kw>prefix</kw> <kw>operator</kw> *~~ {
299299
prefix operator *~~ {}
300-
// CHECK: <attr-builtin>postfix</attr-builtin> <kw>operator</kw> ~~* {
300+
// CHECK: <kw>postfix</kw> <kw>operator</kw> ~~* {
301301
postfix operator ~~* {}
302302

303303
func test_defer() {
@@ -381,11 +381,11 @@ func keywordInCaseAndLocalArgLabel(_ for: Int, for in: Int, class _: Int) {
381381

382382
// CHECK: <kw>class</kw> <id>Ownership</id> {
383383
class Ownership {
384-
// CHECK: <attr-builtin>weak</attr-builtin> <kw>var</kw> <id>w</id>
384+
// CHECK: <kw>weak</kw> <kw>var</kw> <id>w</id>
385385
weak var w
386-
// CHECK: <attr-builtin>unowned</attr-builtin> <kw>var</kw> <id>u</id>
386+
// CHECK: <kw>unowned</kw> <kw>var</kw> <id>u</id>
387387
unowned var u
388-
// CHECK: <attr-builtin>unowned</attr-builtin>(<id>unsafe</id>) <kw>var</kw> <id>uu</id>
388+
// CHECK: <kw>unowned</kw>(<id>unsafe</id>) <kw>var</kw> <id>uu</id>
389389
unowned(unsafe) var uu
390390
}
391391
// FIXME: CHECK: <kw>let</kw> closure = { [weak x=bindtox, unowned y=bindtoy, unowned(unsafe) z=bindtoz] <kw>in</kw> }

0 commit comments

Comments
 (0)