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

Fatal error: Internal inconsistency: No test reporter for test case argumentIDs: #749

Closed
Kyle-Ye opened this issue Oct 7, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@Kyle-Ye
Copy link
Contributor

Kyle-Ye commented Oct 7, 2024

Description

Related issue: swiftlang/swift#76637 (comment)

Using the trick mentioned above can solve most of my needs.

But it seems I just hit another corner case in swift-tesing.

Expected behavior

No fatal error.

Actual behavior

XCTest/HarnessEventHandler.swift:282: Fatal error: Internal inconsistency: No test reporter for test case argumentIDs: Optional([Testing.Test.Case.Argument.ID(bytes: [48]), Testing.Test.Case.Argument.ID(bytes: [34, 35, 52, 102, 55, 56, 97, 50, 101, 100, 102, 54, 52, 51, 48, 101, 52, 50, 100, 55, 50, 49, 98, 53, 53, 50, 51, 102, 102, 57, 99, 102, 98, 48, 57, 100, 51, 99, 97, 57, 53, 98, 34])]) in test DemoKitTests.STests/PTypeConformance(value:expected:)/DemoKitTests.swift:5:6

Steps to reproduce

Use provided DemoKit package to reproduce it.

DemoKit.zip

swift-testing version/commit hash

None

Swift & OS version (output of swift --version ; uname -a)

Xcode 16.0.0 with Swift 5 language mode

@Kyle-Ye Kyle-Ye added the bug Something isn't working label Oct 7, 2024
@Kyle-Ye
Copy link
Contributor Author

Kyle-Ye commented Oct 7, 2024

Some strange behavior: change expected to an ""/"11" or update the description implementation (return ""/"11" directly) will not trigger the fatalError crash.

@Kyle-Ye
Copy link
Contributor Author

Kyle-Ye commented Oct 7, 2024

Close as potentially duplicated of #480

Leave to the maintainer to decide if this is a duplicated one.

@Kyle-Ye Kyle-Ye closed this as completed Oct 7, 2024
@Kyle-Ye
Copy link
Contributor Author

Kyle-Ye commented Oct 7, 2024

Temporary workaround provided by @Brett-Best

@Test(.serialized, arguments:

@Kyle-Ye Kyle-Ye reopened this Oct 7, 2024
@grynspan
Copy link
Contributor

grynspan commented Oct 7, 2024

I believe you're right and this is a duplicate, but @stmontgomery can probably confirm.

@stmontgomery
Copy link
Contributor

This is effectively a dupe of #480, yes. But this manifestation of the problem is different than what was described in that issue. Here, the problem is that two arguments of a parameterized test have identical ID representations (even though their specific arguments: are different.) Either way, I do believe the fixes will be related, so we can dupe this.

Duplicate of #480

@stmontgomery stmontgomery closed this as not planned Won't fix, can't repro, duplicate, stale Oct 7, 2024
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

3 participants