Skip to content

Commit 9119255

Browse files
Merge pull request #10 from SomeRandomiOSDev/LinuxSupport
Added support for Linux
2 parents 0382680 + 102742e commit 9119255

File tree

12 files changed

+225
-28
lines changed

12 files changed

+225
-28
lines changed

.github/workflows/swift.yml

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,25 @@ on: [push, pull_request]
44

55
jobs:
66
build:
7-
8-
runs-on: macOS-latest
9-
7+
strategy:
8+
matrix:
9+
os: [macOS-latest, ubuntu-latest]
10+
swift: ["5.1"]
11+
runs-on: ${{ matrix.os }}
12+
env:
13+
SWIFT_VERSION: ${{ matrix.swift }}
14+
SWIFT_EXEC: .swiftenv/shims/swift
1015
steps:
1116
- uses: actions/checkout@v2
17+
- name: Install Swift
18+
run: |
19+
git clone https://github.com/kylef/swiftenv.git ~/.swiftenv
20+
~/.swiftenv/bin/swiftenv install $SWIFT_VERSION --skip-existing
21+
~/.swiftenv/bin/swiftenv rehash
1222
- name: Build
13-
run: swift build -v
14-
- name: Run Tests
15-
run: swift test -v
23+
run: |
24+
~/$SWIFT_EXEC --version
25+
~/$SWIFT_EXEC build -v
26+
- name: Test
27+
run: |
28+
~/$SWIFT_EXEC test -v

.swiftlint.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ opt_in_rules:
4444
- multiple_closures_with_trailing_closure
4545
- nesting
4646
- notification_center_detachment
47-
- number_separator
4847
- object_literal
4948
- operator_usage_whitespace
5049
- override_in_extension
@@ -60,8 +59,9 @@ opt_in_rules:
6059
- yoda_condition
6160

6261
excluded:
63-
- Pods
64-
- Carthage
62+
- .build
63+
- Tests/LinuxMain.swift
64+
- Tests/CBORCodingTests/XCTestManifests.swift
6565

6666
reporter: "xcode"
6767

.travis.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,8 @@ os: osx
22
language: swift
33
osx_image: xcode11.3
44
xcode_project: CBORCoding.xcodeproj
5-
addons:
6-
homebrew:
7-
packages:
8-
carthage
95

106
script:
11-
- carthage bootstrap
12-
137
- set -o pipefail && travis_retry xcodebuild -scheme "CBORCodingTests" -destination "platform=iOS Simulator,name=iPhone 11 Pro Max" -configuration Debug ONLY_ACTIVE_ARCH=YES -enableCodeCoverage YES test
148
- set -o pipefail && travis_retry xcodebuild -scheme "CBORCoding macOS Tests" -destination "platform=macOS" -configuration Debug ONLY_ACTIVE_ARCH=YES -enableCodeCoverage YES test
159
- set -o pipefail && travis_retry xcodebuild -scheme "CBORCoding tvOS Tests" -destination "platform=tvOS Simulator,name=Apple TV 4K" -configuration Debug ONLY_ACTIVE_ARCH=YES -enableCodeCoverage YES test

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@ CBORCoding
55
[![CocoaPods Compatible](https://img.shields.io/cocoapods/v/CBORCoding.svg)](https://cocoapods.org/pods/CBORCoding)
66
[![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)
77
[![Platform](https://img.shields.io/cocoapods/p/CBORCoding.svg)](https://cocoapods.org/pods/CBORCoding)
8+
![Linux](https://img.shields.io/badge/platform-linux-lightgrey)
89
[![Build](https://travis-ci.com/SomeRandomiOSDev/CBORCoding.svg?branch=master)](https://travis-ci.com/SomeRandomiOSDev/CBORCoding)
910
[![Code Coverage](https://codecov.io/gh/SomeRandomiOSDev/CBORCoding/branch/master/graph/badge.svg)](https://codecov.io/gh/SomeRandomiOSDev/CBORCoding)
1011
[![Codacy](https://api.codacy.com/project/badge/Grade/8ad52c117e4a46d9aa4699d22fc0bf49)](https://app.codacy.com/app/SomeRandomiOSDev/CBORCoding?utm_source=github.com&utm_medium=referral&utm_content=SomeRandomiOSDev/CBORCoding&utm_campaign=Badge_Grade_Dashboard)
12+
![Swift](https://github.com/SomeRandomiOSDev/CBORCoding/workflows/Swift/badge.svg)
1113

1214
**CBORCoding** is a lightweight framework containing a coder pair for encoding and decoding `Codable` conforming types to and from [CBOR](https://cbor.io) document format for iOS, macOS, tvOS, and watchOS.
1315

Sources/CBORCoding/CBOR+Equatable.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ extension CBOR.Bignum: Equatable {
4343

4444
// MARK: - CBOR.DecimalFraction Extension
4545

46-
extension CBOR.DecimalFraction: Equatable where I1: Equatable, I2: Equatable {
46+
extension CBOR.DecimalFraction: Equatable {
4747

4848
public static func == (lhs: CBOR.DecimalFraction<I1, I2>, rhs: CBOR.DecimalFraction<I1, I2>) -> Bool {
4949
return lhs.exponent == rhs.exponent && lhs.mantissa == rhs.mantissa
@@ -52,7 +52,7 @@ extension CBOR.DecimalFraction: Equatable where I1: Equatable, I2: Equatable {
5252

5353
// MARK: - CBOR.Bigfloat Extension
5454

55-
extension CBOR.Bigfloat: Equatable where I1: Equatable, I2: Equatable {
55+
extension CBOR.Bigfloat: Equatable {
5656

5757
public static func == (lhs: CBOR.Bigfloat<I1, I2>, rhs: CBOR.Bigfloat<I1, I2>) -> Bool {
5858
return lhs.exponent == rhs.exponent && lhs.mantissa == rhs.mantissa

Sources/CBORCoding/CBORDecoder.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -757,8 +757,8 @@ private struct __CBORKeyedDecodingContainer<K: CodingKey>: KeyedDecodingContaine
757757
throw DecodingError._typeMismatch(at: codingPath, expectation: [String: Any].self, reality: value)
758758
}
759759

760-
let container = __CBORKeyedDecodingContainer<NestedKey>(referencing: decoder, wrapping: dictionary)
761-
return KeyedDecodingContainer(container)
760+
let keyedContainer = __CBORKeyedDecodingContainer<NestedKey>(referencing: decoder, wrapping: dictionary)
761+
return KeyedDecodingContainer(keyedContainer)
762762
}
763763

764764
func nestedUnkeyedContainer(forKey key: Key) throws -> UnkeyedDecodingContainer {

Sources/CBORCoding/CBOREncoder.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -965,8 +965,8 @@ private struct __CBORKeyedEncodingContainer<K>: KeyedEncodingContainerProtocol w
965965
self.codingPath.append(key)
966966
defer { self.codingPath.removeLast() }
967967

968-
let container = __CBORKeyedEncodingContainer<NestedKey>(referencing: encoder, codingPath: codingPath, wrapping: dictionary)
969-
return KeyedEncodingContainer<NestedKey>(container)
968+
let keyedContainer = __CBORKeyedEncodingContainer<NestedKey>(referencing: encoder, codingPath: codingPath, wrapping: dictionary)
969+
return KeyedEncodingContainer<NestedKey>(keyedContainer)
970970
}
971971

972972
mutating func nestedUnkeyedContainer(forKey key: Key) -> UnkeyedEncodingContainer {
@@ -1046,8 +1046,8 @@ private struct __CBORUnkeyedEncodingContainer: UnkeyedEncodingContainer {
10461046
let dictionary = CodingKeyDictionary<Any>(indefiniteLength: encoder.newContainerLength.contains(.indefinite))
10471047
container.append(dictionary)
10481048

1049-
let container = __CBORKeyedEncodingContainer<NestedKey>(referencing: encoder, codingPath: codingPath, wrapping: dictionary)
1050-
return KeyedEncodingContainer<NestedKey>(container)
1049+
let keyedContainer = __CBORKeyedEncodingContainer<NestedKey>(referencing: encoder, codingPath: codingPath, wrapping: dictionary)
1050+
return KeyedEncodingContainer<NestedKey>(keyedContainer)
10511051
}
10521052

10531053
mutating func nestedUnkeyedContainer() -> UnkeyedEncodingContainer {
@@ -1117,7 +1117,7 @@ private class __CBORReferencingEncoder: __CBOREncoder {
11171117
}
11181118

11191119
switch reference {
1120-
case .array(var array, let index):
1120+
case let .array(array, index):
11211121
array.insert(value, at: index)
11221122

11231123
case let .dictionary(dictionary, key):

Sources/CBORCoding/CBORParser.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1065,7 +1065,7 @@ internal class CBORParser {
10651065

10661066
let index = containers.count - 1
10671067

1068-
if var array = containers[index] as? (container: ArrayWrapper<Any>, length: UInt64?) {
1068+
if let array = containers[index] as? (container: ArrayWrapper<Any>, length: UInt64?) {
10691069
array.container.append(value)
10701070
containers[index].length -= 1
10711071
} else if let dictionary = containers[index] as? (container: CodingKeyDictionary<Any>, length: UInt64?) {
@@ -1207,7 +1207,7 @@ internal class CBORParser {
12071207

12081208
// MARK: - Optional Extension
12091209

1210-
extension Optional where Wrapped: AdditiveArithmetic {
1210+
extension Optional where Wrapped == UInt64 {
12111211

12121212
fileprivate static func -= (lhs: inout Wrapped?, rhs: Wrapped) {
12131213
if let value = lhs {

Sources/CBORCoding/Containers.swift

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,14 @@ internal class ArrayWrapper<Element>: MutableCollection, RandomAccessCollection,
7171
func replaceSubrange<C, R>(_ subrange: R, with newElements: __owned C) where C: Collection, R: RangeExpression, Element == C.Element, Index == R.Bound {
7272
array.replaceSubrange(subrange, with: newElements)
7373
}
74+
75+
func insert(_ newElement: __owned Element, at i: Int) {
76+
array.insert(newElement, at: i)
77+
}
78+
79+
func append(_ newElement: __owned Element) {
80+
array.append(newElement)
81+
}
7482
}
7583

7684
// MARK: - CodingKeyDictionary Definition
@@ -151,7 +159,6 @@ internal class CodingKeyDictionary<Value>: Sequence, ExpressibleByDictionaryLite
151159
// MARK: - ExpressibleByDictionaryLiteral Protocol Requirements
152160

153161
typealias Key = CodingKey
154-
typealias Value = Value
155162

156163
required init(dictionaryLiteral elements: (Key, Value)...) {
157164
self.keyValuePairs = elements

Tests/CBORCodingTests/CBOREncoderTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class CBOREncoderTests: XCTestCase {
3333
(try! encoder.encode(UInt64(1000)), "0x1903E8"),
3434
(try! encoder.encode(UInt64(1000000)), "0x1A000F4240"),
3535
(try! encoder.encode(UInt64(1000000000000)), "0x1B000000E8D4A51000"),
36-
(try! encoder.encode(UInt64(18446744073709551615)), "0x1BFFFFFFFFFFFFFFFF"),
36+
(try! encoder.encode(18446744073709551615 as UInt64), "0x1BFFFFFFFFFFFFFFFF"),
3737
(try! encoder.encode(CBOR.Bignum(isPositive: true,
3838
content: Data([UInt8(0x01), 0x00, 0x00, 0x00,
3939
0x00, 0x00, 0x00, 0x00, 0x00]))), "0xC249010000000000000000"), // 18446744073709551616
Lines changed: 173 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,173 @@
1+
#if !canImport(ObjectiveC)
2+
import XCTest
3+
4+
extension CBORDecoderTests {
5+
// DO NOT MODIFY: This is autogenerated, use:
6+
// `swift test --generate-linuxmain`
7+
// to regenerate.
8+
static let __allTests__CBORDecoderTests = [
9+
("testAppendixAComplexExamples1", testAppendixAComplexExamples1),
10+
("testAppendixAComplexExamples10", testAppendixAComplexExamples10),
11+
("testAppendixAComplexExamples2", testAppendixAComplexExamples2),
12+
("testAppendixAComplexExamples3", testAppendixAComplexExamples3),
13+
("testAppendixAComplexExamples4", testAppendixAComplexExamples4),
14+
("testAppendixAComplexExamples5", testAppendixAComplexExamples5),
15+
("testAppendixAComplexExamples6", testAppendixAComplexExamples6),
16+
("testAppendixAComplexExamples7", testAppendixAComplexExamples7),
17+
("testAppendixAComplexExamples8", testAppendixAComplexExamples8),
18+
("testAppendixAComplexExamples9", testAppendixAComplexExamples9),
19+
("testAppendixASimpleExamples", testAppendixASimpleExamples),
20+
("testDecodeDecimalFractionsAndBigfloats", testDecodeDecimalFractionsAndBigfloats),
21+
("testDecodeIntKeyedValues", testDecodeIntKeyedValues),
22+
("testDecodeKeyedValuesFailureCases", testDecodeKeyedValuesFailureCases),
23+
("testDecodeNestedUnkeyedContainers", testDecodeNestedUnkeyedContainers),
24+
("testDecoderUserInfo", testDecoderUserInfo),
25+
("testDecodeSingleValueFailureCases", testDecodeSingleValueFailureCases),
26+
("testDecodeSingleValues", testDecodeSingleValues),
27+
("testDecodeStringKeyedValues", testDecodeStringKeyedValues),
28+
("testDecodeUnkeyedValues", testDecodeUnkeyedValues),
29+
("testDecodeUnkeyedValuesFailureCases1", testDecodeUnkeyedValuesFailureCases1),
30+
("testDecodeUnkeyedValuesFailureCases2", testDecodeUnkeyedValuesFailureCases2),
31+
("testFailureCases", testFailureCases),
32+
("testSuperDecoder1", testSuperDecoder1),
33+
("testSuperDecoder2", testSuperDecoder2),
34+
("testSuperDecoder3", testSuperDecoder3),
35+
("testSuperDecoder4", testSuperDecoder4),
36+
]
37+
}
38+
39+
extension CBOREncoderTests {
40+
// DO NOT MODIFY: This is autogenerated, use:
41+
// `swift test --generate-linuxmain`
42+
// to regenerate.
43+
static let __allTests__CBOREncoderTests = [
44+
("testAppendixAComplexExamples1", testAppendixAComplexExamples1),
45+
("testAppendixAComplexExamples10", testAppendixAComplexExamples10),
46+
("testAppendixAComplexExamples11", testAppendixAComplexExamples11),
47+
("testAppendixAComplexExamples12", testAppendixAComplexExamples12),
48+
("testAppendixAComplexExamples13", testAppendixAComplexExamples13),
49+
("testAppendixAComplexExamples14", testAppendixAComplexExamples14),
50+
("testAppendixAComplexExamples15", testAppendixAComplexExamples15),
51+
("testAppendixAComplexExamples16", testAppendixAComplexExamples16),
52+
("testAppendixAComplexExamples17", testAppendixAComplexExamples17),
53+
("testAppendixAComplexExamples18", testAppendixAComplexExamples18),
54+
("testAppendixAComplexExamples19", testAppendixAComplexExamples19),
55+
("testAppendixAComplexExamples2", testAppendixAComplexExamples2),
56+
("testAppendixAComplexExamples20", testAppendixAComplexExamples20),
57+
("testAppendixAComplexExamples3", testAppendixAComplexExamples3),
58+
("testAppendixAComplexExamples4", testAppendixAComplexExamples4),
59+
("testAppendixAComplexExamples5", testAppendixAComplexExamples5),
60+
("testAppendixAComplexExamples6", testAppendixAComplexExamples6),
61+
("testAppendixAComplexExamples7", testAppendixAComplexExamples7),
62+
("testAppendixAComplexExamples8", testAppendixAComplexExamples8),
63+
("testAppendixAComplexExamples9", testAppendixAComplexExamples9),
64+
("testAppendixASimpleExamples", testAppendixASimpleExamples),
65+
("testDuplicateContainers1", testDuplicateContainers1),
66+
("testDuplicateContainers2", testDuplicateContainers2),
67+
("testEncodeEmptyDataTypes", testEncodeEmptyDataTypes),
68+
("testEncodePrimitiveTypes1", testEncodePrimitiveTypes1),
69+
("testEncodePrimitiveTypes2", testEncodePrimitiveTypes2),
70+
("testEncodePrimitiveTypes3", testEncodePrimitiveTypes3),
71+
("testEncodePrimitiveTypes4", testEncodePrimitiveTypes4),
72+
("testEncoderUserInfo", testEncoderUserInfo),
73+
("testFailureCases", testFailureCases),
74+
("testSelfDescribedCBOR", testSelfDescribedCBOR),
75+
("testSuperEncoder1", testSuperEncoder1),
76+
("testSuperEncoder2", testSuperEncoder2),
77+
("testSuperEncoder3", testSuperEncoder3),
78+
("testTaggedValues", testTaggedValues),
79+
("testTaggedValuesFailureCases", testTaggedValuesFailureCases),
80+
]
81+
}
82+
83+
extension CBORParserTests {
84+
// DO NOT MODIFY: This is autogenerated, use:
85+
// `swift test --generate-linuxmain`
86+
// to regenerate.
87+
static let __allTests__CBORParserTests = [
88+
("testAppendixAComplexExamples1", testAppendixAComplexExamples1),
89+
("testAppendixAComplexExamples10", testAppendixAComplexExamples10),
90+
("testAppendixAComplexExamples2", testAppendixAComplexExamples2),
91+
("testAppendixAComplexExamples3", testAppendixAComplexExamples3),
92+
("testAppendixAComplexExamples4", testAppendixAComplexExamples4),
93+
("testAppendixAComplexExamples5", testAppendixAComplexExamples5),
94+
("testAppendixAComplexExamples6", testAppendixAComplexExamples6),
95+
("testAppendixAComplexExamples7", testAppendixAComplexExamples7),
96+
("testAppendixAComplexExamples8", testAppendixAComplexExamples8),
97+
("testAppendixAComplexExamples9", testAppendixAComplexExamples9),
98+
("testAppendixASimpleExamples", testAppendixASimpleExamples),
99+
("testCreateCodingKeys", testCreateCodingKeys),
100+
("testDecodeMapCodingKeys", testDecodeMapCodingKeys),
101+
("testDirectDecoding", testDirectDecoding),
102+
("testFailureCases", testFailureCases),
103+
("testTaggedValues", testTaggedValues),
104+
("testTypeParsing", testTypeParsing),
105+
]
106+
}
107+
108+
extension CBORTests {
109+
// DO NOT MODIFY: This is autogenerated, use:
110+
// `swift test --generate-linuxmain`
111+
// to regenerate.
112+
static let __allTests__CBORTests = [
113+
("testCBOREncoded", testCBOREncoded),
114+
("testDecodeBigfloatWithOtherEncoder", testDecodeBigfloatWithOtherEncoder),
115+
("testDecodeBignumWithOtherEncoder", testDecodeBignumWithOtherEncoder),
116+
("testDecodeDecimalFractionWithOtherEncoder", testDecodeDecimalFractionWithOtherEncoder),
117+
("testDecodeIndefiniteLengthDataWithOtherEncoder", testDecodeIndefiniteLengthDataWithOtherEncoder),
118+
("testDecodeIndefiniteLengthStringWithOtherEncoder", testDecodeIndefiniteLengthStringWithOtherEncoder),
119+
("testDecodeNegativeUInt64WithOtherEncoder", testDecodeNegativeUInt64WithOtherEncoder),
120+
("testDecodeSimpleValueWithOtherEncoder", testDecodeSimpleValueWithOtherEncoder),
121+
("testDirectlyDecodeBignum", testDirectlyDecodeBignum),
122+
("testDirectlyDecodeIndefiniteLengthArray", testDirectlyDecodeIndefiniteLengthArray),
123+
("testDirectlyDecodeIndefiniteLengthData", testDirectlyDecodeIndefiniteLengthData),
124+
("testDirectlyDecodeIndefiniteLengthMap", testDirectlyDecodeIndefiniteLengthMap),
125+
("testDirectlyDecodeIndefiniteLengthString", testDirectlyDecodeIndefiniteLengthString),
126+
("testDirectlyDecodeNegativeUInt64", testDirectlyDecodeNegativeUInt64),
127+
("testDirectlyDecodeSimpleValue", testDirectlyDecodeSimpleValue),
128+
("testDirectlyDecodeUndefined", testDirectlyDecodeUndefined),
129+
("testDirectlyEncodeCBOREncoded", testDirectlyEncodeCBOREncoded),
130+
("testDirectlyEncodeIndefiniteLengthData", testDirectlyEncodeIndefiniteLengthData),
131+
("testDirectlyEncodeIndefiniteLengthString", testDirectlyEncodeIndefiniteLengthString),
132+
("testDirectlyEncodeNegativeUInt64", testDirectlyEncodeNegativeUInt64),
133+
("testDirectlyEncodeUndefined", testDirectlyEncodeUndefined),
134+
("testEncodeBigfloatWithOtherEncoder", testEncodeBigfloatWithOtherEncoder),
135+
("testEncodeBignumWithOtherEncoder", testEncodeBignumWithOtherEncoder),
136+
("testEncodeCBOREncodedWithOtherEncoder", testEncodeCBOREncodedWithOtherEncoder),
137+
("testEncodeDecimalFractionWithOtherEncoder", testEncodeDecimalFractionWithOtherEncoder),
138+
("testEncodeIndefiniteLengthArrayWithOtherEncoder", testEncodeIndefiniteLengthArrayWithOtherEncoder),
139+
("testEncodeIndefiniteLengthDataWithOtherEncoder", testEncodeIndefiniteLengthDataWithOtherEncoder),
140+
("testEncodeIndefiniteLengthMapWithOtherEncoder", testEncodeIndefiniteLengthMapWithOtherEncoder),
141+
("testEncodeIndefiniteLengthStringWithOtherEncoder", testEncodeIndefiniteLengthStringWithOtherEncoder),
142+
("testEncodeNegativeUInt64WithOtherEncoder", testEncodeNegativeUInt64WithOtherEncoder),
143+
("testEncodeSimpleValueWithOtherEncoder", testEncodeSimpleValueWithOtherEncoder),
144+
("testEncodeUndefinedWithOtherEncoder", testEncodeUndefinedWithOtherEncoder),
145+
("testIndefiniteLengthDataInitialization", testIndefiniteLengthDataInitialization),
146+
("testIndefiniteLengthStringInitialization", testIndefiniteLengthStringInitialization),
147+
("testTagInitialization", testTagInitialization),
148+
("testTagValues", testTagValues),
149+
]
150+
}
151+
152+
extension ContainersTests {
153+
// DO NOT MODIFY: This is autogenerated, use:
154+
// `swift test --generate-linuxmain`
155+
// to regenerate.
156+
static let __allTests__ContainersTests = [
157+
("testArrayWrapperImplementedProtocolRequirements", testArrayWrapperImplementedProtocolRequirements),
158+
("testArrayWrapperInitialization", testArrayWrapperInitialization),
159+
("testCodingKeyDictionaryImplementedProtocolRequirements", testCodingKeyDictionaryImplementedProtocolRequirements),
160+
("testCodingKeyDictionaryInitialization", testCodingKeyDictionaryInitialization),
161+
]
162+
}
163+
164+
public func __allTests() -> [XCTestCaseEntry] {
165+
return [
166+
testCase(CBORDecoderTests.__allTests__CBORDecoderTests),
167+
testCase(CBOREncoderTests.__allTests__CBOREncoderTests),
168+
testCase(CBORParserTests.__allTests__CBORParserTests),
169+
testCase(CBORTests.__allTests__CBORTests),
170+
testCase(ContainersTests.__allTests__ContainersTests),
171+
]
172+
}
173+
#endif

Tests/LinuxMain.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import XCTest
2+
3+
import CBORCodingTests
4+
5+
var tests = [XCTestCaseEntry]()
6+
tests += CBORCodingTests.__allTests()
7+
8+
XCTMain(tests)

0 commit comments

Comments
 (0)