Skip to content

Commit 095c998

Browse files
committed
Updated unit tests
1 parent b62d05b commit 095c998

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

Tests/TLVCodingTests/TLVCodingTests.swift

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,14 @@ final class TLVCodingTests: XCTestCase {
135135
),
136136
Data([0, 4, 1, 2, 3, 4, 1, 2, 1, 0])
137137
)
138+
139+
test(
140+
PrimitiveArray(
141+
strings: ["1", "two", "three", ""],
142+
integers: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
143+
),
144+
Data([0, 17, 0, 1, 49, 1, 3, 116, 119, 111, 2, 5, 116, 104, 114, 101, 101, 3, 0, 1, 60, 0, 4, 1, 0, 0, 0, 1, 4, 2, 0, 0, 0, 2, 4, 3, 0, 0, 0, 3, 4, 4, 0, 0, 0, 4, 4, 5, 0, 0, 0, 5, 4, 6, 0, 0, 0, 6, 4, 7, 0, 0, 0, 7, 4, 8, 0, 0, 0, 8, 4, 9, 0, 0, 0, 9, 4, 10, 0, 0, 0])
145+
)
138146
}
139147

140148
func testCodingKeys() {
@@ -274,3 +282,9 @@ public extension Binary {
274282
}
275283
}
276284
}
285+
286+
public struct PrimitiveArray: Codable, Equatable {
287+
288+
var strings: [String]
289+
var integers: [Int]
290+
}

0 commit comments

Comments
 (0)