@@ -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