ConcurrentDictionary in C#: retarget net10.0, NUnit 4.6.1, add the unsized naive example - #2230
Open
vladimir-pecanac-main wants to merge 1 commit into
Conversation
…sized naive example - Both projects net7.0 to net10.0. - Microsoft.NET.Test.Sdk 18.10.1, NUnit 4.6.1, NUnit3TestAdapter 6.3.0, NUnit.Analyzers 4.15.0, coverlet.collector 10.0.1. The classic asserts compile unchanged on NUnit 4.6.1, so no test assertion is rewritten. - Add NaiveExampleUnsized, the unsized Dictionary the article opens with, and run it from Program.cs inside a try/catch that prints the exception. No test for it: the throw is probabilistic. - ContentionExample: remove the unused emptyHits local and call the empty-state check directly. - Rename the wall-clock comparison test to end in _Live so CI skips it. - Drop the duplicate sut field initialisers that [SetUp] already assigns. - Program.cs names the two slower examples before running them.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Updates the sample for the ConcurrentDictionary in C# article (collections-csharp/ConcurrentDictionary only).
Changes:
Verified locally on SDK 10.0.302, runtime 10.0.10: dotnet build -c Release with 0 warnings and 0 errors; dotnet test with 10 of 10 passing, and 9 of 9 with the CI filter; dotnet list package --vulnerable --include-transitive reports nothing.