Skip to content

Tests for code that should not be compiled #2616

Answered by bartelink
AlexRadch asked this question in Ideas
Discussion options

You must be logged in to vote

I'd say there's not much xunit specific to your request; as such, it may make sense to ask on stack overflow?

I've seen people (e.g. https://github.com/Azure/azure-cosmos-dotnet-v3) do such API surface testing by having a text file in the repo with a known state, and then programmatically walk the binary and see if they are still the same. When something mismatches, the dev can then either update the expected result to reflect the new shape, or fix the problem.

The name of that general technique escapes me atm (there are libs that focus on providing assertion helpers for showing diffs from object trees cleanly). (In the small, one might use the term characterization test, but that's not t…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@bartelink
Comment options

@bradwilson
Comment options

Answer selected by bradwilson
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
3 participants