SomeRandomiOSDev / CBORCoding

Easy CBOR encoding and decoding for iOS, macOS, tvOS and watchOS.
MIT License
49 stars 14 forks source link

[BUG]: `swift test` is failing on Linux #29

Closed dabrahams closed 11 months ago

dabrahams commented 12 months ago

Expected Behavior

pass

Actual Behavior

Failure log is here

Steps To Reproduce

Let tests run in CI or run them on your own Linux box

Project Version

e12b478

The OS/Variant where this issue occurs.

The version of Xcode that was used when this issue appeared.

n/a

What was the environment in which the issue appeared?

Additional Context

In CI, on Linux

dabrahams commented 12 months ago

Reproduces in a local .devcontainer on my mac:

/workspaces/CBORCoding/Tests/CBORCodingTests/CBORParserTests.swift:176: error: CBORParserTests.testAppendixASimpleExamples : XCTAssertEqual failed: ("-inf") is not equal to ("0.0") -

Looking at the code that does this decoding, I don't really understand it but the use of unsafe operations makes me at least a little suspicious.

SomeRandomiOSDev commented 11 months ago

Fixed in the Half library and updated this to use the fixed version