Fix duplicated test name in Perf.TypeName and update validation #4898
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Due to how the FullNameProvider works, the
Dictionary<string, bool>[]
andDictionary<List<int[]>[,], List<int?[][][,]>>[]
arguments were both being converted to the stringSystem.Collections.Generic.Dictionary`2[]
. Patching this in BenchmarkDotNet would cause too many test names to change, and this is the only case in this repo that there is a duplicate full name, so we can address it by wrapping the type and overriding the ToString.The display names that I have put here ensure that the test names remain the same as they were before, with only the
Dictionary<List<int[]>[,], List<int?[][][,]>>[]
case now being converted totypeof(System.Collections.Generic.Dictionary`2[]) (COMPLEX)
to differentiate it from the simpler case.I have also updated the validators to ensure this doesn't happen again.