Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: Most tests fail on Linux #16

Open
2 of 12 tasks
dabrahams opened this issue Nov 13, 2023 · 0 comments
Open
2 of 12 tasks

[BUG]: Most tests fail on Linux #16

dabrahams opened this issue Nov 13, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@dabrahams
Copy link

Expected Behavior

all tests pass

Actual Behavior

> Test run started at 11/13/2023, 7:42:21 PM <

Test Suite 'All tests' started at 2023-11-13 19:42:21.388
Test Suite 'debug.xctest' started at 2023-11-13 19:42:21.389
Test Suite 'HalfCodingTests' started at 2023-11-13 19:42:21.389
Test Case 'HalfCodingTests.testEncodingDecoding' started at 2023-11-13 19:42:21.389
/workspaces/Half/Tests/HalfTests/Half+CodingTests.swift:86: error: HalfCodingTests.testEncodingDecoding : XCTAssertTrue failed - 
Test Case 'HalfCodingTests.testEncodingDecoding' failed (0.002 seconds)
Test Case 'HalfCodingTests.testThrowingCases' started at 2023-11-13 19:42:21.391
Test Case 'HalfCodingTests.testThrowingCases' passed (0.001 seconds)
Test Suite 'HalfCodingTests' failed at 2023-11-13 19:42:21.392
         Executed 2 tests, with 1 failure (0 unexpected) in 0.003 (0.003) seconds
Test Suite 'HalfTests' started at 2023-11-13 19:42:21.392
Test Case 'HalfTests.testAddProduct' started at 2023-11-13 19:42:21.392
Test Case 'HalfTests.testAddProduct' passed (0.001 seconds)
Test Case 'HalfTests.testBasicComparisons' started at 2023-11-13 19:42:21.393
Test Case 'HalfTests.testBasicComparisons' passed (0.0 seconds)
Test Case 'HalfTests.testBasicMathematicalFunctions' started at 2023-11-13 19:42:21.393
Test Case 'HalfTests.testBasicMathematicalFunctions' passed (0.0 seconds)
Test Case 'HalfTests.testBasicValues' started at 2023-11-13 19:42:21.393
Test Case 'HalfTests.testBasicValues' passed (0.0 seconds)
Test Case 'HalfTests.testBinade' started at 2023-11-13 19:42:21.393
/workspaces/Half/Tests/HalfTests/HalfTests.swift:424: error: HalfTests.testBinade : XCTAssertEqual failed: ("0.0") is not equal to ("16.0") - 
/workspaces/Half/Tests/HalfTests/HalfTests.swift:425: error: HalfTests.testBinade : XCTAssertEqual failed: ("0.0") is not equal to ("5.9604645e-08") - 
Test Case 'HalfTests.testBinade' failed (0.0 seconds)
Test Case 'HalfTests.testBitPattern' started at 2023-11-13 19:42:21.394
Test Case 'HalfTests.testBitPattern' passed (0.028 seconds)
Test Case 'HalfTests.testCanonical' started at 2023-11-13 19:42:21.422
Test Case 'HalfTests.testCanonical' passed (0.023 seconds)
Test Case 'HalfTests.testConvertFromIntTypes' started at 2023-11-13 19:42:21.445
Test Case 'HalfTests.testConvertFromIntTypes' passed (0.001 seconds)
Test Case 'HalfTests.testConvertFromOtherFloatTypes' started at 2023-11-13 19:42:21.445
/workspaces/Half/Tests/HalfTests/HalfTests.swift:80: error: HalfTests.testConvertFromOtherFloatTypes : XCTAssertEqual failed: ("3.140625") is not equal to ("-23600.0") - 
Test Case 'HalfTests.testConvertFromOtherFloatTypes' failed (0.001 seconds)
Test Case 'HalfTests.testDescription' started at 2023-11-13 19:42:21.446
Test Case 'HalfTests.testDescription' passed (0.001 seconds)
Test Case 'HalfTests.testExponent' started at 2023-11-13 19:42:21.446
Test Case 'HalfTests.testExponent' passed (0.0 seconds)
Test Case 'HalfTests.testHashableProtocolMethods' started at 2023-11-13 19:42:21.447
Test Case 'HalfTests.testHashableProtocolMethods' passed (0.0 seconds)
Test Case 'HalfTests.testLargestNumbers' started at 2023-11-13 19:42:21.447
Test Case 'HalfTests.testLargestNumbers' passed (0.0 seconds)
Test Case 'HalfTests.testManualFloatingPointInitialization' started at 2023-11-13 19:42:21.448
/workspaces/Half/Tests/HalfTests/HalfTests.swift:56: error: HalfTests.testManualFloatingPointInitialization : XCTAssertTrue failed - 
Test Case 'HalfTests.testManualFloatingPointInitialization' failed (0.084 seconds)
Test Case 'HalfTests.testNegativeHalfs' started at 2023-11-13 19:42:21.531
/workspaces/Half/Tests/HalfTests/HalfTests.swift:245: error: HalfTests.testNegativeHalfs : XCTAssertEqual failed: ("0.0") is not equal to ("2.0") - 
/workspaces/Half/Tests/HalfTests/HalfTests.swift:248: error: HalfTests.testNegativeHalfs : XCTAssertEqual failed: ("0.0") is not equal to ("2.0") - 
/workspaces/Half/Tests/HalfTests/HalfTests.swift:251: error: HalfTests.testNegativeHalfs : XCTAssertEqual failed: ("0.0") is not equal to ("2.0") - 
Test Case 'HalfTests.testNegativeHalfs' failed (0.0 seconds)
Test Case 'HalfTests.testNonNumberValues' started at 2023-11-13 19:42:21.532
Test Case 'HalfTests.testNonNumberValues' passed (0.0 seconds)
Test Case 'HalfTests.testOutputStreamable' started at 2023-11-13 19:42:21.532
Test Case 'HalfTests.testOutputStreamable' passed (0.001 seconds)
Test Case 'HalfTests.testPi' started at 2023-11-13 19:42:21.533
Test Case 'HalfTests.testPi' passed (0.0 seconds)
Test Case 'HalfTests.testRemainder' started at 2023-11-13 19:42:21.533
Test Case 'HalfTests.testRemainder' passed (0.0 seconds)
Test Case 'HalfTests.testRounding' started at 2023-11-13 19:42:21.534
Test Case 'HalfTests.testRounding' passed (0.0 seconds)
Test Case 'HalfTests.testSignificand' started at 2023-11-13 19:42:21.534
Test Case 'HalfTests.testSignificand' passed (0.0 seconds)
Test Case 'HalfTests.testSignificandWidth' started at 2023-11-13 19:42:21.534
Test Case 'HalfTests.testSignificandWidth' passed (0.001 seconds)
Test Case 'HalfTests.testSmallestNumbers' started at 2023-11-13 19:42:21.535
Test Case 'HalfTests.testSmallestNumbers' passed (0.001 seconds)
Test Case 'HalfTests.testSquareRoot' started at 2023-11-13 19:42:21.536
/workspaces/Half/Tests/HalfTests/HalfTests.swift:356: error: HalfTests.testSquareRoot : XCTAssertEqual failed: ("0.0") is not equal to ("2.0") - 
/workspaces/Half/Tests/HalfTests/HalfTests.swift:360: error: HalfTests.testSquareRoot : XCTAssertEqual failed: ("0.0") is not equal to ("9.0") - 
Test Case 'HalfTests.testSquareRoot' failed (0.0 seconds)
Test Case 'HalfTests.testStrideableProtocolMethods' started at 2023-11-13 19:42:21.536
Test Case 'HalfTests.testStrideableProtocolMethods' passed (0.0 seconds)
Test Case 'HalfTests.testTruncatingRemainder' started at 2023-11-13 19:42:21.536
Test Case 'HalfTests.testTruncatingRemainder' passed (0.0 seconds)
Test Case 'HalfTests.testULP' started at 2023-11-13 19:42:21.537
Test Case 'HalfTests.testULP' passed (0.0 seconds)
Test Suite 'HalfTests' failed at 2023-11-13 19:42:21.537
         Executed 27 tests, with 9 failures (0 unexpected) in 0.144 (0.144) seconds
Test Suite 'TestFunctions' started at 2023-11-13 19:42:21.537
Test Case 'TestFunctions.testAllFunctions' started at 2023-11-13 19:42:21.537
Test Case 'TestFunctions.testAllFunctions' passed (0.0 seconds)
Test Suite 'TestFunctions' passed at 2023-11-13 19:42:21.537
         Executed 1 test, with 0 failures (0 unexpected) in 0.0 (0.0) seconds
Test Suite 'TestCHalf' started at 2023-11-13 19:42:21.537
Test Case 'TestCHalf.testArithmeticFunctions' started at 2023-11-13 19:42:21.537
Test Case 'TestCHalf.testArithmeticFunctions' passed (0.0 seconds)
Test Case 'TestCHalf.testConstructorFunctions' started at 2023-11-13 19:42:21.538
Test Case 'TestCHalf.testConstructorFunctions' passed (0.0 seconds)
Test Case 'TestCHalf.testConvertToFromPrimitiveValues' started at 2023-11-13 19:42:21.538
/workspaces/Half/Tests/CHalfTests/CHalfTests.swift:43: error: TestCHalf.testConvertToFromPrimitiveValues : XCTAssertEqual failed: ("0.0") is not equal to ("-1.0") - 
Test Case 'TestCHalf.testConvertToFromPrimitiveValues' failed (0.0 seconds)
Test Case 'TestCHalf.testConvertingToFromRawValue' started at 2023-11-13 19:42:21.539
Test Case 'TestCHalf.testConvertingToFromRawValue' passed (0.001 seconds)
Test Case 'TestCHalf.testLogicFunctions' started at 2023-11-13 19:42:21.540
Test Case 'TestCHalf.testLogicFunctions' passed (0.001 seconds)
Test Case 'TestCHalf.testMiscellaneousFunctions' started at 2023-11-13 19:42:21.541
/workspaces/Half/Tests/CHalfTests/CHalfTests.swift:94: error: TestCHalf.testMiscellaneousFunctions : XCTAssertEqual failed: ("0.0") is not equal to ("9.0") - 
/workspaces/Half/Tests/CHalfTests/CHalfTests.swift:101: error: TestCHalf.testMiscellaneousFunctions : XCTAssertEqual failed: ("0.0") is not equal to ("3.0") - 
Test Case 'TestCHalf.testMiscellaneousFunctions' failed (0.0 seconds)
Test Suite 'TestCHalf' failed at 2023-11-13 19:42:21.541
         Executed 6 tests, with 3 failures (0 unexpected) in 0.003 (0.003) seconds
Test Suite 'debug.xctest' failed at 2023-11-13 19:42:21.541
         Executed 36 tests, with 13 failures (0 unexpected) in 0.151 (0.151) seconds
Test Suite 'All tests' failed at 2023-11-13 19:42:21.541
         Executed 36 tests, with 13 failures (0 unexpected) in 0.151 (0.151) seconds

Steps To Reproduce

run the tests

Project Version

1.4.0

The OS/Variant where this issue occurs.

  • iOS
  • macOS
  • tvOS
  • watchOS
  • Mac Catalyst
  • Other (Please specify in "Additional Context" section)

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

15.0.1

What was the environment in which the issue appeared?

  • Half.xcodeproj
  • Package.swift
  • Carthage
  • CocoaPods
  • Swift Package Manager
  • Other (Please specify in "Additional Context" section)

Additional Context

Tested in a local devcontainer.

Note that this would be a non-issue for CBORCoding if you accepted the PR that switches to Float16. Of course it's still an issue for this package if anyone wants to go on using it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants