Skip to content

Commit 8134656

Browse files
Amritpan Kauramritpan
authored andcommitted
[Tests] Update failing tests to match new output.
1 parent 1278d5b commit 8134656

File tree

5 files changed

+51
-51
lines changed

5 files changed

+51
-51
lines changed

test/Concurrency/async_overload_filtering.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ func filter_async(_: String) -> Void {}
1616

1717
var a: String? = nil
1818

19-
// CHECK: attempting disjunction choice $T0 bound to decl async_overload_filtering.(file).filter_async(fn2:)
20-
// CHECK-NEXT: overload set choice binding $T0 := {{.*}}
21-
// CHECK-NEXT: (considering -> ({{.*}}) -> {{.*}} applicable fn {{.*}}
22-
// CHECK: increasing 'sync-in-asynchronous' score by 1
23-
// CHECK: solution is worse than the best solution
19+
// CHECK: Attempting disjunction choice $T0 bound to decl async_overload_filtering.(file).filter_async(fn2:)
20+
// CHECK-NEXT: Overload set choice binding [[A:\$T[0-9]+]] := {{.*}}
21+
// CHECK: `-> Considering -> ({{.*}}) -> {{.*}} applicable fn [[A]]
22+
// CHECK: | `- Increasing 'sync-in-asynchronous' score by 1
23+
// CHECK: | Solution is worse than the best solution
2424
filter_async {
2525
Obj()
2626
}.op("" + (a ?? "a"))

test/Constraints/common_type.swift

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -27,27 +27,27 @@ func f(_: Int) -> X { return X() }
2727
func f(_: Double) -> Y { return Y() }
2828

2929
func testCallCommonType() {
30-
// CHECK: overload set choice binding $T{{[0-9]+}} := (Int) -> X
31-
// CHECK: (considering -> $T{{[0-9]+}}[.g: value] == [[G:\$T[0-9]+]]
32-
// CHECK: (common result type for [[G]] is Int)
33-
// CHECK: (overload set choice binding $T{{[0-9]+}} := (Double) -> Y)
34-
// CHECK: (considering -> $T{{[0-9]+}}[.g: value] == [[F:\$T[0-9]+]]
35-
// CHECK: (common result type for [[F]] is Double)
30+
// CHECK: Overload set choice binding $T{{[0-9]+}} := (Int) -> X
31+
// CHECK: `-> Considering -> $T{{[0-9]+}}[.g: value] == [[G:\$T[0-9]+]]
32+
// CHECK: | Common result type for [[G]] is Int
33+
// CHECK: Overload set choice binding $T{{[0-9]+}} := (Double) -> Y
34+
// CHECK: `-> Considering -> $T{{[0-9]+}}[.g: value] == [[F:\$T[0-9]+]]
35+
// CHECK: | Common result type for [[F]] is Double
3636
_ = f(0).g(0)
3737
}
3838

3939
func testSubscriptCommonType() {
4040
// CHECK: subscript_expr
41-
// CHECK: overload set choice binding $T{{[0-9]+}} := (Int) -> X
42-
// CHECK: (common result type for $T{{[0-9]+}} is String)
43-
// CHECK: (overload set choice binding $T{{[0-9]+}} := (Double) -> Y)
44-
// CHECK: (common result type for $T{{[0-9]+}} is Substring)
41+
// CHECK: Overload set choice binding $T{{[0-9]+}} := (Int) -> X
42+
// CHECK: | Common result type for $T{{[0-9]+}} is String
43+
// CHECK: Overload set choice binding $T{{[0-9]+}} := (Double) -> Y
44+
// CHECK: | Common result type for $T{{[0-9]+}} is Substring
4545
_ = f(0)[0]
4646
}
4747

4848
func testCommonTypeIUO() {
49-
// CHECK: overload set choice binding $T{{[0-9]+}} := (Int) -> X
50-
// CHECK-NOT: common result type
49+
// CHECK: Overload set choice binding $T{{[0-9]+}} := (Int) -> X
50+
// CHECK-NOT: | Common result type
5151
_ = f(0).iuo(0)
5252
}
5353

@@ -60,10 +60,10 @@ struct Z {
6060
}
6161

6262
func testCommonTypeInit() {
63-
// CHECK: common result type for {{.*}} is Z
63+
// CHECK: | Common result type for {{.*}} is Z
6464
_ = Z(a: 0)
6565

66-
// CHECK-NOT: common result type
66+
// CHECK-NOT: | Common result type
6767
_ = Z(b: 0)
6868
}
6969

@@ -76,9 +76,9 @@ class InheritsDynamicSelf: DynamicSelf {
7676
}
7777

7878
func testCommonTypeDynamicSelf(ds: DynamicSelf, ids: InheritsDynamicSelf) {
79-
// CHECK: common result type for {{.*}} is DynamicSelf
79+
// CHECK: | Common result type for {{.*}} is DynamicSelf
8080
_ = ds.foo(0)
81-
// CHECK: common result type for {{.*}} is InheritsDynamicSelf
81+
// CHECK: | Common result type for {{.*}} is InheritsDynamicSelf
8282
_ = ids.foo(0)
8383
}
8484

test/Constraints/common_type_objc.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ import Foundation
1414
}
1515

1616
func testOptional(obj: P) {
17-
// CHECK: common result type for {{.*}} is Int
17+
// CHECK: | Common result type for {{.*}} is Int
1818
_ = obj.opt?(1)
1919

20-
// CHECK: common result type for {{.*}} is Int
20+
// CHECK: | Common result type for {{.*}} is Int
2121
_ = obj.opt!(1)
2222
}

test/Constraints/one_way_solve.swift

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -27,23 +27,23 @@ func testTernaryOneWayOverload(b: Bool) {
2727
// CHECK: 2: $T{{[0-9]+}} $T{{[0-9]+}} $T{{[0-9]+}}
2828
// CHECK: 0: $T{{[0-9]+}} $T{{[0-9]+}} $T{{[0-9]+}}
2929

30-
// CHECK: solving component #1
31-
// CHECK: (attempting type variable [[C]] := Int8
30+
// CHECK: Solving component #1
31+
// CHECK: Attempting type variable [[C]] := Int8
3232

33-
// CHECK: solving component #1
34-
// CHECK: (attempting type variable [[C]] := Int8
33+
// CHECK: Solving component #1
34+
// CHECK: Attempting type variable [[C]] := Int8
3535

36-
// CHECK: solving component #1
37-
// CHECK: (attempting type variable [[C]] := Int8
36+
// CHECK: Solving component #1
37+
// CHECK: Attempting type variable [[C]] := Int8
3838

39-
// CHECK: solving component #1
40-
// CHECK: (attempting type variable [[C]] := Int8
41-
// CHECK: (considering -> $T{{[0-9]+}} conv [[C]]
42-
// CHECK: (considering -> $T{{[0-9]+}} conv [[C]]
43-
// CHECK: (considering -> [[C]] conv Int8
44-
// CHECK: (found solution: [component: non-default literal(s), value: 2] [component: use of overloaded unapplied function(s), value: 2])
39+
// CHECK: Solving component #1
40+
// CHECK: Attempting type variable [[C]] := Int8
41+
// CHECK: `-> Considering -> [[A]] conv [[C]]
42+
// CHECK: `-> Considering -> [[B]] conv [[C]]
43+
// CHECK: `-> Considering -> [[C]] conv Int8
44+
// CHECK: <! Found solution: [component: non-default literal(s), value: 2] [component: use of overloaded unapplied function(s), value: 2]>
4545

46-
// CHECK: (composed solution: [component: non-default literal(s), value: 2] [component: use of overloaded unapplied function(s), value: 2])
47-
// CHECK-NOT: (composed solution: [component: non-default literal(s), value: 2] [component: use of overloaded unapplied function(s), value: 2])
46+
// CHECK: <! Composed solution: [component: non-default literal(s), value: 2] [component: use of overloaded unapplied function(s), value: 2]>
47+
// CHECK-NOT: <! Composed solution: [component: non-default literal(s), value: 2] [component: use of overloaded unapplied function(s), value: 2]>
4848
let _: Int8 = b ? Builtin.one_way(int8Or16(17)) : Builtin.one_way(int8Or16(42))
4949
}

test/Constraints/overload_filtering.swift

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ func foo(_: Int, _: Int) { }
99
func foo(_: Int, _: Int, _: Int) { }
1010

1111
func testModuleScope(i: Int) {
12-
// CHECK: (disabled disjunction term {{.*}} (Int) -> ()
13-
// CHECK-NEXT: (disabled disjunction term {{.*}} (Int, Int, Int) -> ()
14-
// CHECK: (introducing single enabled disjunction term {{.*}} (Int, Int) -> ()
12+
// CHECK: | Disabled disjunction term {{.*}} (Int) -> ()
13+
// CHECK-NEXT: | Disabled disjunction term {{.*}} (Int, Int, Int) -> ()
14+
// CHECK: | Introducing single enabled disjunction term {{.*}} (Int, Int) -> ()
1515
foo(i, i)
1616
}
1717

@@ -26,20 +26,20 @@ struct X {
2626
}
2727

2828
func testSubscript(x: X, i: Int) {
29-
// CHECK: disabled disjunction term {{.*}}X.subscript(_:)
30-
// CHECK-NEXT: disabled disjunction term {{.*}}X.subscript(_:_:_:)
31-
// CHECK-NEXT: introducing single enabled disjunction term {{.*}} bound to decl overload_filtering.(file).X.subscript(_:_:)
29+
// CHECK: | Disabled disjunction term {{.*}}X.subscript(_:)
30+
// CHECK-NEXT: | Disabled disjunction term {{.*}}X.subscript(_:_:_:)
31+
// CHECK-NEXT: | Introducing single enabled disjunction term {{.*}} bound to decl overload_filtering.(file).X.subscript(_:_:)
3232
_ = x[i, i]
3333
}
3434

3535
func testUnresolvedMember(i: Int) -> X {
36-
// CHECK: disabled disjunction term {{.*}} bound to decl overload_filtering.(file).X.init(_:)
37-
// CHECK-NEXT: disabled disjunction term {{.*}} bound to decl overload_filtering.(file).X.init(_:_:_:)
38-
// CHECK-NEXT: (removed constraint: disjunction
36+
// CHECK: | Disabled disjunction term {{.*}} bound to decl overload_filtering.(file).X.init(_:)
37+
// CHECK-NEXT: | Disabled disjunction term {{.*}} bound to decl overload_filtering.(file).X.init(_:_:_:)
38+
// CHECK-NEXT: | `- Removed constraint: disjunction
3939
// CHECK-NEXT: > [[A:\$T[0-9]+]] bound to decl overload_filtering
4040
// CHECK-NEXT: > [disabled] [[A]] bound to decl overload_filtering
4141
// CHECK-NEXT: > [disabled] [[A]] bound to decl overload_filtering
42-
// CHECK-NEXT: introducing single enabled disjunction term {{.*}} bound to decl overload_filtering.(file).X.init(_:_:)
42+
// CHECK-NEXT: | Introducing single enabled disjunction term {{.*}} bound to decl overload_filtering.(file).X.init(_:_:)
4343
return .init(i, i)
4444
}
4545

@@ -58,13 +58,13 @@ func test_member_filtering() {
5858
}
5959

6060
func test(s: S) {
61-
// CHECK: disabled disjunction term {{.*}} bound to decl overload_filtering.(file).test_member_filtering().S.bar(v:)
62-
// CHECK-NEXT: disabled disjunction term {{.*}} bound to decl overload_filtering.(file).test_member_filtering().S.bar(a:b:)
63-
// CHECK-NEXT: (removed constraint: disjunction
61+
// CHECK: | Disabled disjunction term {{.*}} bound to decl overload_filtering.(file).test_member_filtering().S.bar(v:)
62+
// CHECK-NEXT: | Disabled disjunction term {{.*}} bound to decl overload_filtering.(file).test_member_filtering().S.bar(a:b:)
63+
// CHECK-NEXT: `- Removed constraint: disjunction
6464
// CHECK-NEXT: > [[B:\$T[0-9]+]] bound to decl overload_filtering
6565
// CHECK-NEXT: > [disabled] [[B]] bound to decl overload_filtering
6666
// CHECK-NEXT: > [disabled] [[B]] bound to decl overload_filtering
67-
// CHECK-NEXT: introducing single enabled disjunction term {{.*}} bound to decl overload_filtering.(file).test_member_filtering().S.bar
67+
// CHECK-NEXT: | Introducing single enabled disjunction term {{.*}} bound to decl overload_filtering.(file).test_member_filtering().S.bar
6868
s.foo(42).bar(42)
6969
}
7070
}

0 commit comments

Comments
 (0)