Skip to content

Commit

Permalink
Fix LengthUnit/isDefault test crash on Xcode 16
Browse files Browse the repository at this point in the history
Fix for #451 issue.

This seems to be a bug in Xcode 16. See swift forum discussion for more details https://forums.swift.org/t/fatal-error-internal-inconsistency-no-test-reporter-for-test-case-argumentids/75666.

The test crashes because there are two copies of the same value `LengthUnit.em(.infinity)/LengthUnit.default`. Moved the check of LengthUnit.default into a separate test `LengthUnitTests/defaultValue` to resolve this crash.
  • Loading branch information
erikbasargin committed Jan 31, 2025
1 parent b73d396 commit 1103fd8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Tests/IgniteTesting/Types/LengthUnit.swift
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,14 @@ struct LengthUnitTests {

@Test("Test default value.")
func defaultValue() {
let element = LengthUnit.default.stringValue

let element = LengthUnit.default

#expect(element == .em(.infinity))
#expect(element.description == "infem")
}

@Test("Test is default value.", arguments: [
(LengthUnit.em(20), false),
(LengthUnit.default, true),
(LengthUnit.percent(Percentage(.infinity)), false),
(LengthUnit.em(.infinity), true)
])
Expand Down

0 comments on commit 1103fd8

Please sign in to comment.