Skip to content

Commit 953bf14

Browse files
Adds failing test for duplicate info keys
1 parent 7a5b5f9 commit 953bf14

File tree

4 files changed

+21
-5
lines changed

4 files changed

+21
-5
lines changed

Tests/AppTests/Inputs/Input+Custom.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,10 @@ enum Input {
7373
"<NSLayoutConstraint:0x697d40 'UIView-Encapsulated-Layout-Height' UITableViewCell:0x7fd39b20.height == 80>"
7474
)
7575
"""
76+
77+
static let custom8 = """
78+
(
79+
"<NSLayoutConstraint:0x608000696990 V:[ListViewItemLabel...]-(7)-[ListViewItemLabel...] (active, names: ListViewItemLabel...:0x7f950028efe0, ListViewItemLabel...:0x7f950028e5b0 )>",
80+
)
81+
"""
7682
}

Tests/AppTests/Inputs/Input+Error.swift

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,15 @@ import Foundation
22

33
extension Input {
44

5-
static let error1 = """
5+
static let invalidHexitError = """
66
(
77
"<NSLayoutConstraint:0x61h00099cd0 _UIButtonBarStackView:0x7fb573cxbf90.width <= 0 (active)>"
88
)
99
"""
10+
11+
static let duplicateKeyError = """
12+
(
13+
"<NSLayoutConstraint:0x608000696990 V:[ListViewItemLabel...]-(7)-[ListViewImage-a...] (active, names: ListViewItemLabel...:0x7f950028efe0, ListViewItemLabel...:0x7f950028e5b0 )>",
14+
)
15+
"""
1016
}

Tests/AppTests/ParserTests.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ class ParserTests: SnapshotTestCase {
1919
Input.custom4,
2020
Input.custom5,
2121
Input.custom6,
22-
Input.custom7
22+
Input.custom7,
23+
Input.custom8
2324
]
2425

2526
for input in inputs {

Tests/AppTests/ViewTests.swift

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ class ViewTests: SnapshotTestCase {
3030

3131
func testPostError() throws {
3232
let inputs = [
33-
Input.error1
33+
Input.invalidHexitError,
34+
Input.duplicateKeyError
3435
]
3536

3637
for input in inputs {
@@ -50,7 +51,8 @@ class ViewTests: SnapshotTestCase {
5051
Input.custom4,
5152
Input.custom5,
5253
Input.custom6,
53-
Input.custom7
54+
Input.custom7,
55+
Input.custom8
5456
]
5557

5658
for input in inputs {
@@ -70,7 +72,8 @@ class ViewTests: SnapshotTestCase {
7072
Input.custom4,
7173
Input.custom5,
7274
Input.custom6,
73-
Input.custom7
75+
Input.custom7,
76+
Input.custom8
7477
]
7578

7679
for input in inputs {

0 commit comments

Comments
 (0)