Skip to content

Commit a64323c

Browse files
committed
refactor: remove platform constraints and update test assertions with explicit Bool type
1 parent 45dbee2 commit a64323c

File tree

2 files changed

+4
-13
lines changed

2 files changed

+4
-13
lines changed

Package.swift

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,6 @@ import PackageDescription
44

55
let package = Package(
66
name: "CBOR",
7-
platforms: [
8-
.macOS(.v13),
9-
.iOS(.v13),
10-
.tvOS(.v13),
11-
.watchOS(.v6),
12-
.visionOS(.v1)
13-
],
147
products: [
158
.library(
169
name: "CBOR",

Tests/CBORTests/CBORTaggedAndErrorTests.swift

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ struct CBORTaggedAndErrorTests {
3535

3636
// Verify it's a tagged value
3737
if case .tagged = decoded {
38-
#expect(true, "Successfully decoded a tagged value")
38+
#expect(Bool(true), "Successfully decoded a tagged value")
3939
} else {
4040
Issue.record("Expected a tagged value, got \(decoded)")
4141
}
@@ -138,7 +138,7 @@ struct CBORTaggedAndErrorTests {
138138
Issue.record("Expected to throw for invalid CBOR \(bytes)")
139139
} catch {
140140
// Expected to throw
141-
#expect(true, "Should throw for invalid CBOR")
141+
#expect(Bool(true), "Should throw for invalid CBOR")
142142
}
143143
}
144144
}
@@ -158,7 +158,7 @@ struct CBORTaggedAndErrorTests {
158158
Issue.record("Expected to throw for premature end \(bytes)")
159159
} catch {
160160
// Expected to throw
161-
#expect(true, "Should throw for premature end")
161+
#expect(Bool(true), "Should throw for premature end")
162162
}
163163
}
164164
}
@@ -181,12 +181,10 @@ struct CBORTaggedAndErrorTests {
181181
do {
182182
let _ = try CBOR.decode(data)
183183
Issue.record("Expected to throw for data with extra bytes \(data)")
184-
} catch let error as CBORError {
184+
} catch let error {
185185
// Check if the error is related to extra data
186186
#expect(error.description.contains("extra") || error.description.contains("Extra"),
187187
"Error should mention extra data, got: \(error.description)")
188-
} catch {
189-
Issue.record("Unexpected error type: \(error)")
190188
}
191189
}
192190
}

0 commit comments

Comments
 (0)