diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c783b78..b5b3501 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,7 +22,7 @@ jobs: name: Testing CBOR (ubuntu) needs: swiftlint runs-on: ubuntu-latest - container: swift:6.2-noble + container: swift:6.0-noble steps: - name: Checkout repository uses: actions/checkout@v5 @@ -56,7 +56,7 @@ jobs: uses: actions/checkout@v5 - uses: swift-actions/setup-swift@next with: - swift-version: "6.2" + swift-version: "6.0" - name: Restore .build id: "restore-build" uses: actions/cache/restore@v4 diff --git a/Sources/ProfilingHelper/Profiling.swift b/Sources/ProfilingHelper/Profiling.swift index 31b3401..322042d 100644 --- a/Sources/ProfilingHelper/Profiling.swift +++ b/Sources/ProfilingHelper/Profiling.swift @@ -107,11 +107,11 @@ struct Profiling { func data() throws { try time { - for _ in 0..<1_000_000 { + for _ in 0..<1000 { blackhole(try CBOREncoder().encode(Data([0x01, 0x02, 0x03, 0x04]))) } } _: { - for _ in 0..<1_000_000 { + for _ in 0..<1000 { blackhole(try JSONEncoder().encode(Data([0x01, 0x02, 0x03, 0x04]))) } } diff --git a/Tests/CBORTests/DAGCBORTests.swift b/Tests/CBORTests/DAGCBORTests.swift index 7b5439e..ae47389 100644 --- a/Tests/CBORTests/DAGCBORTests.swift +++ b/Tests/CBORTests/DAGCBORTests.swift @@ -31,14 +31,14 @@ fileprivate struct CID: CIDType { @Suite struct DAGCBORTests { @Test - func `Custom CID Type Encoded Correctly`() throws { + func customCIDTypeEncodedCorrectly() throws { let cid = CID(data: [0, 1, 2, 3, 4, 5, 6, 7, 8]) let data = try DAGCBOREncoder().encode(cid).hexString() #expect(data == "d82a4a00000102030405060708") } @Test - func `Known valid base256 encoded ID`() throws { + func knownValidBase256EncodedID() throws { let cid = CID(data: "017112209fe4ccc6de16724f3a30c7e8f254f3c6471986acb1f8d8cf8e96ce2ad7dbe7fb".asHexData()) let data = try DAGCBOREncoder().encode(cid).hexString() let expected = "d82a582500017112209FE4CCC6DE16724F3A30C7E8F254F3C6471986ACB1F8D8CF8E96CE2AD7DBE7FB".lowercased() @@ -139,7 +139,7 @@ struct DAGCBORTests { } @Test(arguments: [Double.nan, Double.infinity, -Double.infinity]) - func `Nan and Infinite throw errors`(value: Double) throws { + func NanAndInfiniteThrowErrors(value: Double) throws { #expect(throws: EncodingError.self) { try DAGCBOREncoder().encode(value) } @@ -284,7 +284,7 @@ struct DAGCBORTests { } @Test - func `Duplicate keys are deduplicated on encode`() throws { + func duplicateKeysAreDeduplicatedOnEncode() throws { let encoder = DAGCBOREncoder() struct Mock: Encodable { enum CodingKeys: String, CodingKey { diff --git a/Tests/CBORTests/EncodableTests.swift b/Tests/CBORTests/EncodableTests.swift index 89ef443..e51a83e 100644 --- a/Tests/CBORTests/EncodableTests.swift +++ b/Tests/CBORTests/EncodableTests.swift @@ -250,7 +250,7 @@ struct EncodableTests { } @Test - func `Duplicate keys are deduplicated on encode`() throws { + func duplicateKeysAreDeduplicatedOnEncode() throws { let encoder = CBOREncoder() struct Mock: Encodable { enum CodingKeys: String, CodingKey {