Post

Replies

Boosts

Views

Activity

Reply to Parameterized testing with ‘any’ values
@DTS Engineer Thanks for explaining what was wrong with the first part! import Testing protocol ChartDataPoint { } struct BodyFatPoint: ChartDataPoint { } struct ActiveCaloriesPoint: ChartDataPoint { } struct Tests { let expectedBodyFatValues: [Double] = [1.0, 2.0, 3.0] let expectedActiveEnergyValues: [Double] = [1.0, 2.0, 3.0] @Test(arguments: [ (expectedBodyFatValues, BodyFatPoint.self as any ChartDataPoint.Type), (expectedActiveEnergyValues, ActiveCaloriesPoint.self as any ChartDataPoint.Type) ]) func healthKitDataReading( expectedData: [Double], dataChartType: any ChartDataPoint.Type ) async throws { } } I want to use a variable in place of the double array. I’m using 365 values, and with 4 tuples of parameters, it’s a lot to see in the parameters.
Jul ’24
Reply to Xcode 26 build fails with “Could not locate icontool” when using .icon file — how to fix?
Assuming your trash folder isn't emptied, just restore the Icon Composer app to '/Applications/Xcode.app/Contents/Applications/' You can probably even add the standalone download to the folder and it works the same.
Topic: Community SubTopic: Apple Developers Tags:
Replies
Boosts
Views
Activity
Nov ’25
Reply to Parameterized testing with ‘any’ values
@DTS Engineer Thanks for explaining what was wrong with the first part! import Testing protocol ChartDataPoint { } struct BodyFatPoint: ChartDataPoint { } struct ActiveCaloriesPoint: ChartDataPoint { } struct Tests { let expectedBodyFatValues: [Double] = [1.0, 2.0, 3.0] let expectedActiveEnergyValues: [Double] = [1.0, 2.0, 3.0] @Test(arguments: [ (expectedBodyFatValues, BodyFatPoint.self as any ChartDataPoint.Type), (expectedActiveEnergyValues, ActiveCaloriesPoint.self as any ChartDataPoint.Type) ]) func healthKitDataReading( expectedData: [Double], dataChartType: any ChartDataPoint.Type ) async throws { } } I want to use a variable in place of the double array. I’m using 365 values, and with 4 tuples of parameters, it’s a lot to see in the parameters.
Replies
Boosts
Views
Activity
Jul ’24