Skip to content

Commit c63db8a

Browse files
committed
Fix test expectations for @DebugDescription changes around @section syntactic checking
1 parent b47227b commit c63db8a

File tree

9 files changed

+135
-87
lines changed

9 files changed

+135
-87
lines changed

test/Macros/DebugDescription/dollar_handling.swift

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,27 @@ struct MyStruct {
99
var name: String = "thirty"
1010
var debugDescription: String { "${\(self.name)}" }
1111
}
12-
// CHECK: static let _lldb_summary = (
13-
// CHECK: /* version */ 1 as UInt8,
14-
// CHECK: /* record size */ 32 as UInt8,
15-
// CHECK: /* "main.MyStruct" */ 14 as UInt8, 109 as UInt8, 97 as UInt8, 105 as UInt8, 110 as UInt8, 46 as UInt8, 77 as UInt8, 121 as UInt8, 83 as UInt8, 116 as UInt8, 114 as UInt8, 117 as UInt8, 99 as UInt8, 116 as UInt8, 0 as UInt8,
16-
// CHECK: /* "\${${var.name}}" */ 16 as UInt8, 92 as UInt8, 36 as UInt8, 123 as UInt8, 36 as UInt8, 123 as UInt8, 118 as UInt8, 97 as UInt8, 114 as UInt8, 46 as UInt8, 110 as UInt8, 97 as UInt8, 109 as UInt8, 101 as UInt8, 125 as UInt8, 125 as UInt8, 0 as UInt8
12+
// CHECK: static let _lldb_summary: (
13+
// CHECK: {{UInt8(, UInt8)*}}
14+
// CHECK: ) =
15+
// CHECK: (
16+
// CHECK: /* version */ 1,
17+
// CHECK: /* record size */ 32,
18+
// CHECK: /* "main.MyStruct" */ 14, 109, 97, 105, 110, 46, 77, 121, 83, 116, 114, 117, 99, 116, 0,
19+
// CHECK: /* "\${${var.name}}" */ 16, 92, 36, 123, 36, 123, 118, 97, 114, 46, 110, 97, 109, 101, 125, 125, 0
1720
// CHECK: )
1821

1922
@DebugDescription
2023
class MyClass {
2124
var name: String = "thirty"
2225
var lldbDescription: String { "${var.name}" }
2326
}
24-
// CHECK: static let _lldb_summary = (
25-
// CHECK: /* version */ 1 as UInt8,
26-
// CHECK: /* record size */ 27 as UInt8,
27-
// CHECK: /* "main.MyClass" */ 13 as UInt8, 109 as UInt8, 97 as UInt8, 105 as UInt8, 110 as UInt8, 46 as UInt8, 77 as UInt8, 121 as UInt8, 67 as UInt8, 108 as UInt8, 97 as UInt8, 115 as UInt8, 115 as UInt8, 0 as UInt8,
28-
// CHECK: /* "${var.name}" */ 12 as UInt8, 36 as UInt8, 123 as UInt8, 118 as UInt8, 97 as UInt8, 114 as UInt8, 46 as UInt8, 110 as UInt8, 97 as UInt8, 109 as UInt8, 101 as UInt8, 125 as UInt8, 0 as UInt8
27+
// CHECK: static let _lldb_summary: (
28+
// CHECK: {{UInt8(, UInt8)*}}
29+
// CHECK: ) =
30+
// CHECK: (
31+
// CHECK: /* version */ 1,
32+
// CHECK: /* record size */ 27,
33+
// CHECK: /* "main.MyClass" */ 13, 109, 97, 105, 110, 46, 77, 121, 67, 108, 97, 115, 115, 0,
34+
// CHECK: /* "${var.name}" */ 12, 36, 123, 118, 97, 114, 46, 110, 97, 109, 101, 125, 0
2935
// CHECK: )
30-

test/Macros/DebugDescription/explicit_self_property.swift

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,27 @@ struct MyStruct: CustomDebugStringConvertible {
99
var name: String = "thirty"
1010
var debugDescription: String { "name: \(self.name)" }
1111
}
12-
// CHECK: static let _lldb_summary = (
13-
// CHECK: /* version */ 1 as UInt8,
14-
// CHECK: /* record size */ 34 as UInt8,
15-
// CHECK: /* "main.MyStruct" */ 14 as UInt8, 109 as UInt8, 97 as UInt8, 105 as UInt8, 110 as UInt8, 46 as UInt8, 77 as UInt8, 121 as UInt8, 83 as UInt8, 116 as UInt8, 114 as UInt8, 117 as UInt8, 99 as UInt8, 116 as UInt8, 0 as UInt8,
16-
// CHECK: /* "name: ${var.name}" */ 18 as UInt8, 110 as UInt8, 97 as UInt8, 109 as UInt8, 101 as UInt8, 58 as UInt8, 32 as UInt8, 36 as UInt8, 123 as UInt8, 118 as UInt8, 97 as UInt8, 114 as UInt8, 46 as UInt8, 110 as UInt8, 97 as UInt8, 109 as UInt8, 101 as UInt8, 125 as UInt8, 0 as UInt8
12+
// CHECK: static let _lldb_summary: (
13+
// CHECK: {{UInt8(, UInt8)*}}
14+
// CHECK: ) =
15+
// CHECK: (
16+
// CHECK: /* version */ 1,
17+
// CHECK: /* record size */ 34,
18+
// CHECK: /* "main.MyStruct" */ 14, 109, 97, 105, 110, 46, 77, 121, 83, 116, 114, 117, 99, 116, 0,
19+
// CHECK: /* "name: ${var.name}" */ 18, 110, 97, 109, 101, 58, 32, 36, 123, 118, 97, 114, 46, 110, 97, 109, 101, 125, 0
1720
// CHECK: )
1821

1922
@DebugDescription
2023
class MyClass: CustomDebugStringConvertible {
2124
var name: String = "thirty"
2225
var debugDescription: String { "name: \(self.name)" }
2326
}
24-
// CHECK: static let _lldb_summary = (
25-
// CHECK: /* version */ 1 as UInt8,
26-
// CHECK: /* record size */ 33 as UInt8,
27-
// CHECK: /* "main.MyClass" */ 13 as UInt8, 109 as UInt8, 97 as UInt8, 105 as UInt8, 110 as UInt8, 46 as UInt8, 77 as UInt8, 121 as UInt8, 67 as UInt8, 108 as UInt8, 97 as UInt8, 115 as UInt8, 115 as UInt8, 0 as UInt8,
28-
// CHECK: /* "name: ${var.name}" */ 18 as UInt8, 110 as UInt8, 97 as UInt8, 109 as UInt8, 101 as UInt8, 58 as UInt8, 32 as UInt8, 36 as UInt8, 123 as UInt8, 118 as UInt8, 97 as UInt8, 114 as UInt8, 46 as UInt8, 110 as UInt8, 97 as UInt8, 109 as UInt8, 101 as UInt8, 125 as UInt8, 0 as UInt8
27+
// CHECK: static let _lldb_summary: (
28+
// CHECK: {{UInt8(, UInt8)*}}
29+
// CHECK: ) =
30+
// CHECK: (
31+
// CHECK: /* version */ 1,
32+
// CHECK: /* record size */ 33,
33+
// CHECK: /* "main.MyClass" */ 13, 109, 97, 105, 110, 46, 77, 121, 67, 108, 97, 115, 115, 0,
34+
// CHECK: /* "name: ${var.name}" */ 18, 110, 97, 109, 101, 58, 32, 36, 123, 118, 97, 114, 46, 110, 97, 109, 101, 125, 0
2935
// CHECK: )
30-

test/Macros/DebugDescription/extension.swift

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,12 @@ struct MyStruct {}
1010
extension MyStruct {
1111
var debugDescription: String { "thirty" }
1212
}
13-
// CHECK: static let _lldb_summary = (
14-
// CHECK: /* version */ 1 as UInt8,
15-
// CHECK: /* record size */ 34 as UInt8,
16-
// CHECK: /* "^main[.]MyStruct(<.+>)?$" */ 25 as UInt8, 94 as UInt8, 109 as UInt8, 97 as UInt8, 105 as UInt8, 110 as UInt8, 91 as UInt8, 46 as UInt8, 93 as UInt8, 77 as UInt8, 121 as UInt8, 83 as UInt8, 116 as UInt8, 114 as UInt8, 117 as UInt8, 99 as UInt8, 116 as UInt8, 40 as UInt8, 60 as UInt8, 46 as UInt8, 43 as UInt8, 62 as UInt8, 41 as UInt8, 63 as UInt8, 36 as UInt8, 0 as UInt8,
17-
// CHECK: /* "thirty" */ 7 as UInt8, 116 as UInt8, 104 as UInt8, 105 as UInt8, 114 as UInt8, 116 as UInt8, 121 as UInt8, 0 as UInt8
13+
// CHECK: static let _lldb_summary: (
14+
// CHECK: {{UInt8(, UInt8)*}}
15+
// CHECK: ) =
16+
// CHECK: (
17+
// CHECK: /* version */ 1,
18+
// CHECK: /* record size */ 34,
19+
// CHECK: /* "^main[.]MyStruct(<.+>)?$" */ 25, 94, 109, 97, 105, 110, 91, 46, 93, 77, 121, 83, 116, 114, 117, 99, 116, 40, 60, 46, 43, 62, 41, 63, 36, 0,
20+
// CHECK: /* "thirty" */ 7, 116, 104, 105, 114, 116, 121, 0
1821
// CHECK: )

test/Macros/DebugDescription/implicit_self_property.swift

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,27 @@ struct MyStruct: CustomDebugStringConvertible {
99
var name: String = "thirty"
1010
var debugDescription: String { "name: \(name)" }
1111
}
12-
// CHECK: static let _lldb_summary = (
13-
// CHECK: /* version */ 1 as UInt8,
14-
// CHECK: /* record size */ 34 as UInt8,
15-
// CHECK: /* "main.MyStruct" */ 14 as UInt8, 109 as UInt8, 97 as UInt8, 105 as UInt8, 110 as UInt8, 46 as UInt8, 77 as UInt8, 121 as UInt8, 83 as UInt8, 116 as UInt8, 114 as UInt8, 117 as UInt8, 99 as UInt8, 116 as UInt8, 0 as UInt8,
16-
// CHECK: /* "name: ${var.name}" */ 18 as UInt8, 110 as UInt8, 97 as UInt8, 109 as UInt8, 101 as UInt8, 58 as UInt8, 32 as UInt8, 36 as UInt8, 123 as UInt8, 118 as UInt8, 97 as UInt8, 114 as UInt8, 46 as UInt8, 110 as UInt8, 97 as UInt8, 109 as UInt8, 101 as UInt8, 125 as UInt8, 0 as UInt8
12+
// CHECK: static let _lldb_summary: (
13+
// CHECK: {{UInt8(, UInt8)*}}
14+
// CHECK: ) =
15+
// CHECK: (
16+
// CHECK: /* version */ 1,
17+
// CHECK: /* record size */ 34,
18+
// CHECK: /* "main.MyStruct" */ 14, 109, 97, 105, 110, 46, 77, 121, 83, 116, 114, 117, 99, 116, 0,
19+
// CHECK: /* "name: ${var.name}" */ 18, 110, 97, 109, 101, 58, 32, 36, 123, 118, 97, 114, 46, 110, 97, 109, 101, 125, 0
1720
// CHECK: )
1821

1922
@DebugDescription
2023
class MyClass: CustomDebugStringConvertible {
2124
var name: String = "thirty"
2225
var debugDescription: String { "name: \(name)" }
2326
}
24-
// CHECK: static let _lldb_summary = (
25-
// CHECK: /* version */ 1 as UInt8,
26-
// CHECK: /* record size */ 33 as UInt8,
27-
// CHECK: /* "main.MyClass" */ 13 as UInt8, 109 as UInt8, 97 as UInt8, 105 as UInt8, 110 as UInt8, 46 as UInt8, 77 as UInt8, 121 as UInt8, 67 as UInt8, 108 as UInt8, 97 as UInt8, 115 as UInt8, 115 as UInt8, 0 as UInt8,
28-
// CHECK: /* "name: ${var.name}" */ 18 as UInt8, 110 as UInt8, 97 as UInt8, 109 as UInt8, 101 as UInt8, 58 as UInt8, 32 as UInt8, 36 as UInt8, 123 as UInt8, 118 as UInt8, 97 as UInt8, 114 as UInt8, 46 as UInt8, 110 as UInt8, 97 as UInt8, 109 as UInt8, 101 as UInt8, 125 as UInt8, 0 as UInt8
27+
// CHECK: static let _lldb_summary: (
28+
// CHECK: {{UInt8(, UInt8)*}}
29+
// CHECK: ) =
30+
// CHECK: (
31+
// CHECK: /* version */ 1,
32+
// CHECK: /* record size */ 33,
33+
// CHECK: /* "main.MyClass" */ 13, 109, 97, 105, 110, 46, 77, 121, 67, 108, 97, 115, 115, 0,
34+
// CHECK: /* "name: ${var.name}" */ 18, 110, 97, 109, 101, 58, 32, 36, 123, 118, 97, 114, 46, 110, 97, 109, 101, 125, 0
2935
// CHECK: )

test/Macros/DebugDescription/linkage.swift

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,13 @@ struct MyStruct: CustomDebugStringConvertible {
1515
// CHECK: @section("__TEXT,__lldbsummaries")
1616
// CHECK: #endif
1717
// CHECK: @used
18-
// CHECK: static let _lldb_summary = (
19-
// CHECK: /* version */ 1 as UInt8,
20-
// CHECK: /* record size */ 23 as UInt8,
21-
// CHECK: /* "main.MyStruct" */ 14 as UInt8, 109 as UInt8, 97 as UInt8, 105 as UInt8, 110 as UInt8, 46 as UInt8, 77 as UInt8, 121 as UInt8, 83 as UInt8, 116 as UInt8, 114 as UInt8, 117 as UInt8, 99 as UInt8, 116 as UInt8, 0 as UInt8,
22-
// CHECK: /* "thirty" */ 7 as UInt8, 116 as UInt8, 104 as UInt8, 105 as UInt8, 114 as UInt8, 116 as UInt8, 121 as UInt8, 0 as UInt8
18+
// CHECK: static let _lldb_summary: (
19+
// CHECK: {{UInt8(, UInt8)*}}
20+
// CHECK: ) =
21+
// CHECK: (
22+
// CHECK: /* version */ 1,
23+
// CHECK: /* record size */ 23,
24+
// CHECK: /* "main.MyStruct" */ 14, 109, 97, 105, 110, 46, 77, 121, 83, 116, 114, 117, 99, 116, 0,
25+
// CHECK: /* "thirty" */ 7, 116, 104, 105, 114, 116, 121, 0
2326
// CHECK: )
2427
// CHECK: #endif

test/Macros/DebugDescription/long_string.swift

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ struct MyStruct: CustomDebugStringConvertible {
1515
"""
1616
}
1717
}
18-
// CHECK: static let _lldb_summary = (
19-
// CHECK: /* version */ 1 as UInt8,
20-
// CHECK: /* record size */ 192 as UInt8, 2 as UInt8,
21-
// CHECK: 8-bit integer. See https://en.wikipedia.org/wiki/LEB128" */ 175 as UInt8, 2 as UInt8, 65 as UInt8,
18+
/// CHECK: static let _lldb_summary: (
19+
// CHECK: {{UInt8(, UInt8)*}}
20+
// CHECK: ) =
21+
// CHECK: (
22+
// CHECK: /* version */ 1,
23+
// CHECK: /* record size */ 192, 2,
24+
// CHECK: 8-bit integer. See https://en.wikipedia.org/wiki/LEB128" */ 175, 2, 65,

test/Macros/DebugDescription/property_chain.swift

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,27 @@ struct MyStruct: CustomDebugStringConvertible {
99
var name: String = "thirty"
1010
var debugDescription: String { "\(self.name.count) \(name.count)" }
1111
}
12-
// CHECK: static let _lldb_summary = (
13-
// CHECK: /* version */ 1 as UInt8,
14-
// CHECK: /* record size */ 52 as UInt8,
15-
// CHECK: /* "main.MyStruct" */ 14 as UInt8, 109 as UInt8, 97 as UInt8, 105 as UInt8, 110 as UInt8, 46 as UInt8, 77 as UInt8, 121 as UInt8, 83 as UInt8, 116 as UInt8, 114 as UInt8, 117 as UInt8, 99 as UInt8, 116 as UInt8, 0 as UInt8,
16-
// CHECK: /* "${var.name.count} ${var.name.count}" */ 36 as UInt8, 36 as UInt8, 123 as UInt8, 118 as UInt8, 97 as UInt8, 114 as UInt8, 46 as UInt8, 110 as UInt8, 97 as UInt8, 109 as UInt8, 101 as UInt8, 46 as UInt8, 99 as UInt8, 111 as UInt8, 117 as UInt8, 110 as UInt8, 116 as UInt8, 125 as UInt8, 32 as UInt8, 36 as UInt8, 123 as UInt8, 118 as UInt8, 97 as UInt8, 114 as UInt8, 46 as UInt8, 110 as UInt8, 97 as UInt8, 109 as UInt8, 101 as UInt8, 46 as UInt8, 99 as UInt8, 111 as UInt8, 117 as UInt8, 110 as UInt8, 116 as UInt8, 125 as UInt8, 0 as UInt8
12+
// CHECK: static let _lldb_summary: (
13+
// CHECK: {{UInt8(, UInt8)*}}
14+
// CHECK: ) =
15+
// CHECK: (
16+
// CHECK: /* version */ 1,
17+
// CHECK: /* record size */ 52,
18+
// CHECK: /* "main.MyStruct" */ 14, 109, 97, 105, 110, 46, 77, 121, 83, 116, 114, 117, 99, 116, 0,
19+
// CHECK: /* "${var.name.count} ${var.name.count}" */ 36, 36, 123, 118, 97, 114, 46, 110, 97, 109, 101, 46, 99, 111, 117, 110, 116, 125, 32, 36, 123, 118, 97, 114, 46, 110, 97, 109, 101, 46, 99, 111, 117, 110, 116, 125, 0
1720
// CHECK: )
1821

1922
@DebugDescription
2023
class MyClass: CustomDebugStringConvertible {
2124
var name: String = "thirty"
2225
var debugDescription: String { "\(self.name.count) \(name.count)" }
2326
}
24-
// CHECK: static let _lldb_summary = (
25-
// CHECK: /* version */ 1 as UInt8,
26-
// CHECK: /* record size */ 51 as UInt8,
27-
// CHECK: /* "main.MyClass" */ 13 as UInt8, 109 as UInt8, 97 as UInt8, 105 as UInt8, 110 as UInt8, 46 as UInt8, 77 as UInt8, 121 as UInt8, 67 as UInt8, 108 as UInt8, 97 as UInt8, 115 as UInt8, 115 as UInt8, 0 as UInt8,
28-
// CHECK: /* "${var.name.count} ${var.name.count}" */ 36 as UInt8, 36 as UInt8, 123 as UInt8, 118 as UInt8, 97 as UInt8, 114 as UInt8, 46 as UInt8, 110 as UInt8, 97 as UInt8, 109 as UInt8, 101 as UInt8, 46 as UInt8, 99 as UInt8, 111 as UInt8, 117 as UInt8, 110 as UInt8, 116 as UInt8, 125 as UInt8, 32 as UInt8, 36 as UInt8, 123 as UInt8, 118 as UInt8, 97 as UInt8, 114 as UInt8, 46 as UInt8, 110 as UInt8, 97 as UInt8, 109 as UInt8, 101 as UInt8, 46 as UInt8, 99 as UInt8, 111 as UInt8, 117 as UInt8, 110 as UInt8, 116 as UInt8, 125 as UInt8, 0 as UInt8
27+
// CHECK: static let _lldb_summary: (
28+
// CHECK: {{UInt8(, UInt8)*}}
29+
// CHECK: ) =
30+
// CHECK: (
31+
// CHECK: /* version */ 1,
32+
// CHECK: /* record size */ 51,
33+
// CHECK: /* "main.MyClass" */ 13, 109, 97, 105, 110, 46, 77, 121, 67, 108, 97, 115, 115, 0,
34+
// CHECK: /* "${var.name.count} ${var.name.count}" */ 36, 36, 123, 118, 97, 114, 46, 110, 97, 109, 101, 46, 99, 111, 117, 110, 116, 125, 32, 36, 123, 118, 97, 114, 46, 110, 97, 109, 101, 46, 99, 111, 117, 110, 116, 125, 0
2935
// CHECK: )
30-

test/Macros/DebugDescription/static_string.swift

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,31 +8,40 @@
88
struct MyStruct: CustomDebugStringConvertible {
99
var debugDescription: String { "thirty" }
1010
}
11-
// CHECK: static let _lldb_summary = (
12-
// CHECK: /* version */ 1 as UInt8,
13-
// CHECK: /* record size */ 23 as UInt8,
14-
// CHECK: /* "main.MyStruct" */ 14 as UInt8, 109 as UInt8, 97 as UInt8, 105 as UInt8, 110 as UInt8, 46 as UInt8, 77 as UInt8, 121 as UInt8, 83 as UInt8, 116 as UInt8, 114 as UInt8, 117 as UInt8, 99 as UInt8, 116 as UInt8, 0 as UInt8,
15-
// CHECK: /* "thirty" */ 7 as UInt8, 116 as UInt8, 104 as UInt8, 105 as UInt8, 114 as UInt8, 116 as UInt8, 121 as UInt8, 0 as UInt8
11+
// CHECK: static let _lldb_summary: (
12+
// CHECK: {{UInt8(, UInt8)*}}
13+
// CHECK: ) =
14+
// CHECK: (
15+
// CHECK: /* version */ 1,
16+
// CHECK: /* record size */ 23,
17+
// CHECK: /* "main.MyStruct" */ 14, 109, 97, 105, 110, 46, 77, 121, 83, 116, 114, 117, 99, 116, 0,
18+
// CHECK: /* "thirty" */ 7, 116, 104, 105, 114, 116, 121, 0
1619
// CHECK: )
1720

1821
@DebugDescription
1922
class MyClass: CustomDebugStringConvertible {
2023
var debugDescription: String { "thirty" }
2124
}
22-
// CHECK: static let _lldb_summary = (
23-
// CHECK: /* version */ 1 as UInt8,
24-
// CHECK: /* record size */ 22 as UInt8,
25-
// CHECK: /* "main.MyClass" */ 13 as UInt8, 109 as UInt8, 97 as UInt8, 105 as UInt8, 110 as UInt8, 46 as UInt8, 77 as UInt8, 121 as UInt8, 67 as UInt8, 108 as UInt8, 97 as UInt8, 115 as UInt8, 115 as UInt8, 0 as UInt8,
26-
// CHECK: /* "thirty" */ 7 as UInt8, 116 as UInt8, 104 as UInt8, 105 as UInt8, 114 as UInt8, 116 as UInt8, 121 as UInt8, 0 as UInt8
25+
// CHECK: static let _lldb_summary: (
26+
// CHECK: {{UInt8(, UInt8)*}}
27+
// CHECK: ) =
28+
// CHECK: (
29+
// CHECK: /* version */ 1,
30+
// CHECK: /* record size */ 22,
31+
// CHECK: /* "main.MyClass" */ 13, 109, 97, 105, 110, 46, 77, 121, 67, 108, 97, 115, 115, 0,
32+
// CHECK: /* "thirty" */ 7, 116, 104, 105, 114, 116, 121, 0
2733
// CHECK: )
2834

2935
@DebugDescription
3036
class MyEnum: CustomDebugStringConvertible {
3137
var debugDescription: String { "thirty" }
3238
}
33-
// CHECK: static let _lldb_summary = (
34-
// CHECK: /* version */ 1 as UInt8,
35-
// CHECK: /* record size */ 21 as UInt8,
36-
// CHECK: /* "main.MyEnum" */ 12 as UInt8, 109 as UInt8, 97 as UInt8, 105 as UInt8, 110 as UInt8, 46 as UInt8, 77 as UInt8, 121 as UInt8, 69 as UInt8, 110 as UInt8, 117 as UInt8, 109 as UInt8, 0 as UInt8,
37-
// CHECK: /* "thirty" */ 7 as UInt8, 116 as UInt8, 104 as UInt8, 105 as UInt8, 114 as UInt8, 116 as UInt8, 121 as UInt8, 0 as UInt8
39+
// CHECK: static let _lldb_summary: (
40+
// CHECK: {{UInt8(, UInt8)*}}
41+
// CHECK: ) =
42+
// CHECK: (
43+
// CHECK: /* version */ 1,
44+
// CHECK: /* record size */ 21,
45+
// CHECK: /* "main.MyEnum" */ 12, 109, 97, 105, 110, 46, 77, 121, 69, 110, 117, 109, 0,
46+
// CHECK: /* "thirty" */ 7, 116, 104, 105, 114, 116, 121, 0
3847
// CHECK: )

test/Macros/DebugDescription/supported_description.swift

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,29 @@
88
struct MyStruct1: CustomStringConvertible {
99
var description: String { "thirty" }
1010
}
11-
// CHECK: static let _lldb_summary = (
12-
// CHECK: /* version */ 1 as UInt8,
13-
// CHECK: /* record size */ 24 as UInt8,
14-
// CHECK: /* "main.MyStruct1" */ 15 as UInt8, 109 as UInt8, 97 as UInt8, 105 as UInt8, 110 as UInt8, 46 as UInt8, 77 as UInt8, 121 as UInt8, 83 as UInt8, 116 as UInt8, 114 as UInt8, 117 as UInt8, 99 as UInt8, 116 as UInt8, 49 as UInt8, 0 as UInt8,
15-
// CHECK: /* "thirty" */ 7 as UInt8, 116 as UInt8, 104 as UInt8, 105 as UInt8, 114 as UInt8, 116 as UInt8, 121 as UInt8, 0 as UInt8
11+
// CHECK: static let _lldb_summary: (
12+
// CHECK: {{UInt8(, UInt8)*}}
13+
// CHECK: ) =
14+
// CHECK: (
15+
// CHECK: /* version */ 1,
16+
// CHECK: /* record size */ 24,
17+
// CHECK: /* "main.MyStruct1" */ 15, 109, 97, 105, 110, 46, 77, 121, 83, 116, 114, 117, 99, 116, 49, 0,
18+
// CHECK: /* "thirty" */ 7, 116, 104, 105, 114, 116, 121, 0
1619
// CHECK: )
1720

1821
@DebugDescription
1922
struct MyStruct2: CustomDebugStringConvertible {
2023
var description: String { "thirty" }
2124
var debugDescription: String { "eleven" }
2225
}
23-
// CHECK: static let _lldb_summary = (
24-
// CHECK: /* version */ 1 as UInt8,
25-
// CHECK: /* record size */ 24 as UInt8,
26-
// CHECK: /* "main.MyStruct2" */ 15 as UInt8, 109 as UInt8, 97 as UInt8, 105 as UInt8, 110 as UInt8, 46 as UInt8, 77 as UInt8, 121 as UInt8, 83 as UInt8, 116 as UInt8, 114 as UInt8, 117 as UInt8, 99 as UInt8, 116 as UInt8, 50 as UInt8, 0 as UInt8,
27-
// CHECK: /* "eleven" */ 7 as UInt8, 101 as UInt8, 108 as UInt8, 101 as UInt8, 118 as UInt8, 101 as UInt8, 110 as UInt8, 0 as UInt8
26+
// CHECK: static let _lldb_summary: (
27+
// CHECK: {{UInt8(, UInt8)*}}
28+
// CHECK: ) =
29+
// CHECK: (
30+
// CHECK: /* version */ 1,
31+
// CHECK: /* record size */ 24,
32+
// CHECK: /* "main.MyStruct2" */ 15, 109, 97, 105, 110, 46, 77, 121, 83, 116, 114, 117, 99, 116, 50, 0,
33+
// CHECK: /* "eleven" */ 7, 101, 108, 101, 118, 101, 110, 0
2834
// CHECK: )
2935

3036
@DebugDescription
@@ -33,8 +39,11 @@ struct MyStruct3: CustomDebugStringConvertible {
3339
var debugDescription: String { "eleven" }
3440
var lldbDescription: String { "two" }
3541
}
36-
// CHECK: static let _lldb_summary = (
37-
// CHECK: /* version */ 1 as UInt8,
38-
// CHECK: /* record size */ 21 as UInt8,
39-
// CHECK: /* "main.MyStruct3" */ 15 as UInt8, 109 as UInt8, 97 as UInt8, 105 as UInt8, 110 as UInt8, 46 as UInt8, 77 as UInt8, 121 as UInt8, 83 as UInt8, 116 as UInt8, 114 as UInt8, 117 as UInt8, 99 as UInt8, 116 as UInt8, 51 as UInt8, 0 as UInt8,
40-
// CHECK: /* "two" */ 4 as UInt8, 116 as UInt8, 119 as UInt8, 111 as UInt8, 0 as UInt8
42+
// CHECK: static let _lldb_summary: (
43+
// CHECK: {{UInt8(, UInt8)*}}
44+
// CHECK: ) =
45+
// CHECK: (
46+
// CHECK: /* version */ 1,
47+
// CHECK: /* record size */ 21,
48+
// CHECK: /* "main.MyStruct3" */ 15, 109, 97, 105, 110, 46, 77, 121, 83, 116, 114, 117, 99, 116, 51, 0,
49+
// CHECK: /* "two" */ 4, 116, 119, 111, 0

0 commit comments

Comments
 (0)