Skip to content

Commit a9be9cf

Browse files
committed
[ConstraintSystem][NFC] update tests for new individual labeling fixes
1 parent e98c72b commit a9be9cf

File tree

11 files changed

+288
-226
lines changed

11 files changed

+288
-226
lines changed

test/ClangImporter/objc_missing_designated_init.swift

Lines changed: 48 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,66 @@
33
import UnimportableMembers
44
import UnimportableMembersUser
55

6-
class IncompleteInitSubclassImplicit : IncompleteDesignatedInitializers { // expected-note 6 {{incorrect labels for candidate}}
6+
class IncompleteInitSubclassImplicit : IncompleteDesignatedInitializers {
7+
// expected-note@-1 {{incorrect label for candidate (have: 'missing:', expected: 'first:')}}
8+
// expected-note@-2 {{incorrect label for candidate (have: 'missing:', expected: 'second:')}}
9+
// expected-note@-3 {{incorrect label for candidate (have: 'conveniently:', expected: 'first:')}}
10+
// expected-note@-4 {{incorrect label for candidate (have: 'conveniently:', expected: 'second:')}}
11+
// expected-note@-5 {{incorrect label for candidate (have: 'category:', expected: 'first:')}}
12+
// expected-note@-6 {{incorrect label for candidate (have: 'category:', expected: 'second:')}}
713
var myOneNewMember = 1
814
}
915

1016
class IncompleteInitSubclass : IncompleteDesignatedInitializers {
11-
override init(first: Int) {} // expected-note 3 {{incorrect labels for candidate}}
12-
override init(second: Int) {} // expected-note 3 {{incorrect labels for candidate}}
17+
override init(first: Int) {}
18+
// expected-note@-1 {{incorrect label for candidate (have: 'missing:', expected: 'first:')}}
19+
// expected-note@-2 {{incorrect label for candidate (have: 'conveniently:', expected: 'first:')}}
20+
// expected-note@-3 {{incorrect label for candidate (have: 'category:', expected: 'first:')}}
21+
override init(second: Int) {}
22+
// expected-note@-1 {{incorrect label for candidate (have: 'missing:', expected: 'second:')}}
23+
// expected-note@-2 {{incorrect label for candidate (have: 'conveniently:', expected: 'second:')}}
24+
// expected-note@-3 {{incorrect label for candidate (have: 'category:', expected: 'second:')}}
1325
}
1426

15-
class IncompleteConvenienceInitSubclass : IncompleteConvenienceInitializers {} // expected-note 2 {{incorrect labels for candidate}}
27+
class IncompleteConvenienceInitSubclass : IncompleteConvenienceInitializers {}
28+
// expected-note@-1 {{incorrect label for candidate (have: 'missing:', expected: 'first:')}}
29+
// expected-note@-2 {{incorrect label for candidate (have: 'missing:', expected: 'second:')}}
1630

17-
class IncompleteUnknownInitSubclass : IncompleteUnknownInitializers {} // expected-note 4 {{incorrect labels for candidate}}
31+
class IncompleteUnknownInitSubclass : IncompleteUnknownInitializers {}
32+
// expected-note@-1 {{incorrect label for candidate (have: 'missing:', expected: 'first:')}}
33+
// expected-note@-2 {{incorrect label for candidate (have: 'missing:', expected: 'second:')}}
34+
// expected-note@-3 {{incorrect label for candidate (have: 'missing:', expected: 'conveniently:')}}
35+
// expected-note@-4 {{incorrect label for candidate (have: 'missing:', expected: 'category:')}}
1836

19-
class IncompleteInitCategorySubclassImplicit : IncompleteDesignatedInitializersWithCategory {} // expected-note 6 {{incorrect labels for candidate}}
37+
class IncompleteInitCategorySubclassImplicit : IncompleteDesignatedInitializersWithCategory {}
38+
// expected-note@-1 {{incorrect label for candidate (have: 'missing:', expected: 'first:')}}
39+
// expected-note@-2 {{incorrect label for candidate (have: 'missing:', expected: 'second:')}}
40+
// expected-note@-3 {{incorrect label for candidate (have: 'conveniently:', expected: 'first:')}}
41+
// expected-note@-4 {{incorrect label for candidate (have: 'conveniently:', expected: 'second:')}}
42+
// expected-note@-5 {{incorrect label for candidate (have: 'category:', expected: 'first:')}}
43+
// expected-note@-6 {{incorrect label for candidate (have: 'category:', expected: 'second:')}}
2044

2145
class IncompleteInitCategorySubclass : IncompleteDesignatedInitializersWithCategory {
22-
override init(first: Int) {} // expected-note 3 {{incorrect labels for candidate}}
23-
override init(second: Int) {} // expected-note 3 {{incorrect labels for candidate}}
46+
override init(first: Int) {}
47+
// expected-note@-1 {{incorrect label for candidate (have: 'missing:', expected: 'first:')}}
48+
// expected-note@-2 {{incorrect label for candidate (have: 'conveniently:', expected: 'first:')}}
49+
// expected-note@-3 {{incorrect label for candidate (have: 'category:', expected: 'first:')}}
50+
override init(second: Int) {}
51+
// expected-note@-1 {{incorrect label for candidate (have: 'missing:', expected: 'second:')}}
52+
// expected-note@-2 {{incorrect label for candidate (have: 'conveniently:', expected: 'second:')}}
53+
// expected-note@-3 {{incorrect label for candidate (have: 'category:', expected: 'second:')}}
2454
}
2555

26-
class DesignatedInitializerInAnotherModuleSubclass : DesignatedInitializerInAnotherModule {} // expected-note 9 {{incorrect labels for candidate}}
27-
56+
class DesignatedInitializerInAnotherModuleSubclass : DesignatedInitializerInAnotherModule {}
57+
// expected-note@-1 {{incorrect label for candidate (have: 'missing:', expected: 'first:')}}
58+
// expected-note@-2 {{incorrect label for candidate (have: 'missing:', expected: 'second:')}}
59+
// expected-note@-3 {{incorrect label for candidate (have: 'missing:', expected: 'fromOtherModule:')}}
60+
// expected-note@-4 {{incorrect label for candidate (have: 'conveniently:', expected: 'first:')}}
61+
// expected-note@-5 {{incorrect label for candidate (have: 'conveniently:', expected: 'second:')}}
62+
// expected-note@-6 {{incorrect label for candidate (have: 'conveniently:', expected: 'fromOtherModule:')}}
63+
// expected-note@-7 {{incorrect label for candidate (have: 'category:', expected: 'first:')}}
64+
// expected-note@-8 {{incorrect label for candidate (have: 'category:', expected: 'second:')}}
65+
// expected-note@-9 {{incorrect label for candidate (have: 'category:', expected: 'fromOtherModule:')}}
2866

2967
func testBaseClassesBehaveAsExpected() {
3068
_ = IncompleteDesignatedInitializers(first: 0) // okay

test/ClangImporter/objc_parse.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ func testProtocols(_ b: B, bp: BProto) {
200200
var bp2 : BProto = b
201201
var b2 : B = bp // expected-error{{cannot convert value of type 'BProto' to specified type 'B'}}
202202
bp.method(1, with: 2.5 as Float)
203-
bp.method(1, withFoo: 2.5) // expected-error{{incorrect argument label in call (have '_:withFoo:', expected '_:with:')}}
203+
bp.method(1, withFoo: 2.5) // expected-error{{incorrect argument label in call (have 'withFoo:', expected 'with:')}}
204204
bp2 = b.getAsProto()
205205

206206
var c1 : Cat1Proto = b

0 commit comments

Comments
 (0)