(all except Immutable since another dev is already working
on that).
Marked the remaining DebuggerAttribute tests for SkipOnAot
Moved another common serialization test to the Clone
helper.
Removed an IsSerializable check that was attempting to
reflect on internal framework types (albeit returned through
public api.) Since BinaryFormatter will do the same check
a few steps later, this extra assert adds little value and no other
BinaryFormatterHelper client I've seen has this.
Commit migrated from https://github.com/dotnet/corefx/commit/b5b5e9d6f7589903823564aad37e801bacfd8667
Now instead of Use*Key a project can instead define the assembly key
in the project (genreally the common dir.pops for a project) using
the AssemblyKey property. The accepted values are Open, ECMA, MSFT,
Test.
This change allows for a repo to set the default key they want to use
for projects. In corefx we have switched the default to use the Open
key instead of the old BuildTools default of MSFT key.
As part of this update we are explicitly setting the AssemblyKey in
all the library projects (although it is really only necessary for
projects that aren't the default).
Also with this change we are updating all the new libraries that have
not yet shipped stable (compared to our 1.1 release) and making them
use the Open key. Which means that for prerelease dependencies there
might be some binary breaking changes to consume.
The following libraries ahven't shipped so there key is being
changed from MSFT to Open:
Microsoft.XmlSerializer.Generator
System.CodeDom
System.Configuration.ConfigurationManager
System.Data.Odbc
System.DirectoryServices
System.DirectoryServices.AccountManagement
System.DirectoryServices.Protocols
System.IO.Ports
System.Json
System.Memory
System.Net.HttpListener
System.Net.Mail
System.Net.ServicePoint
System.Net.WebClient
System.Net.WebProxy
System.Private.Xml
System.Private.Xml.Linq
System.Security.Cryptography.Xml
System.Security.Permissions
System.Transactions.Local
System.Web.HttpUtility
Commit migrated from https://github.com/dotnet/corefx/commit/ac09a797d09502ebab61f7167bb856846602e1e6
* Replaced ContainsKey() Calls with TryAdd() Dictionary Calls (Where Applicable)
Replaced `ContainsKey()` method calls with the new `TryAdd()` method
where applicable.
* Reverted `TryAdd()` To Previous Approach
Reverted to earlier approach to avoid unnessary allocation of a new
row.
* Cleaned Up `else-if` Usage with `TryAdd()`
Removed the `TryAdd()` call from within the conditional statements and
moved them to the body
* Added Extra Line for Readability / Coding Style
* Updated Non-Dictionary Test Cases To Use `TryAdd()`
Updated various unit tests to include the `TryAdd()` instead of the
previous `ContainsKey()` pattern. This focused primarily on test casts
that were not dictionary-related at all to help curb any potential
regression issues.
* Added `TryAdd()` Within Dictionary Performance Test
Replaced older `ContainsKey()` implementation with newer `TryAdd()`.
* Reverted PerfDictionary Test to `ContainsKey()` Usage
Changed test to earlier implementation in to make way for .NET Core
specific tests using newer API.
* Created Separate .NET Core Dictionary Performance Test
Copied the existing dictionary performance tests (from
`Perf.Dictionary.cs`) and used the newer `TryAdd()` calls; Adjusted the
projects test file only include these when targeting .NET Core.
* Created Separate .NET Core SQL Manual Test
Reverted previous usage of the newer `TryAdd()` method and created a
separate .NET Core specific file to to be conditionally included and
tested.
* Separated .NET Core ILPrinter Test
Reverted previous changes involving the `TryAdd()` method and created a
seperate file to test this functionality only for .NET Core.
* Created Seperate .NET Core Linq TreeManipulation Tests
Reverted previous changes to the normal tests and created a seperate
test targeting .NET Core with the newer `TryAdd()` usage.
* Created Seperate .NET Core xNodeBuilder Test
Reverted previous changes to the normal tests and created a seperate
test targeting .NET Core with the newer `TryAdd()` usage.
* Missed .NET Core Reference for InternalConnectionWrapper
* Applied Compilation Condition for InternalConnectionWrapper to Avoid Collisions
Applied Compilation Condition for InternalConnectionWrapper to Avoid
Collisions (i.e. either build for .NET Core or use the other one for
non-Core builds)
* Avoiding Another Build Collision with .NET Core Functionality
Added a .NET Core compilation constraint for the .NET Core specific
ILPrinter class to avoid issues when building (i.e. only build .NET Core
or non-Core).
* Fixed Yet Another Potential Build Collision with .NET Core
Added a .NET Core compilation constraint for the .NET Core specific
Performance Dictionary testing class to avoid issues when building (i.e.
only build .NET Core or non-Core).
* Removed More Potential .NET Core Compilation Collisions
Added .NET Core specific constraint to seperate Core and non-Core
classes when building
* Additional .NET Core Build Collision Fix
Added an additional condition to separate .NET Core and non-Core builds.
* Added TryAdd Extension Method for Testing
Added an extension method to support `TryAdd()` calls within test cases
across the solution to avoid code duplication.
* Updated Namespace for Dictionary Extension Methods
Changed from `System.Collection.Tests` to `System.Collections.Generic`
as this wasn't actually a test but rather an extension method.
* Removed Previous Duplicate Tests; Added Extension Method
Removed Previous Duplicate Tests; Added Extension Method Usage
* Updated Extension Method Path
Replaced previous relative pathing string with `$(CommonTestPath)`
* Added Missing Generic Type Parameters to TryAdd Extension Method
* Removed Unnecessary Using Statement
* Updated System.Linq.Expressions Tets to use Extension Method
Removed .NET Core duplicate tests; Added reference to new extension
method (from Common\tests)
* Updated System.Private.Xml.Linq .NET Core Tests to Use TryAdd()
Updated System.Private.Xml.Linq .NET Core Tests to Use TryAdd()
extension method.
* Updated System.Collections To Use Dictionary.TryAdd() Extension Method
Removed previous .NET Core duplicated code and references
* Updated Non-ContainsKey() Tests To Use Extension Method
Updated Non-ContainsKey() tests to use the `TryAdd()` extension method
approach
* Extended TryAdd() Extension Method
Updated the existing `TryAdd()` extension method to target any Dictionary
related interfaces (as opposed to Dictionary implementations)
* Updated References in System.Collections.Test
Removed previous .NET Core specific reference; Added extension method
availability
* Added `TryAdd()` Extension Reference
Added the `TryAdd()` extension for some other dictionary tests that rely
on an interface (which now supports the `TryAdd()` method).
* Removed Explicit .NET Core Compilation Constraint
* Fixed Coding Style Issue
Fixed Coding Style Issue of a missing blank line following the closing
gullwing brace for the if-statement.
* Added `<Link>` Section for Extension Method References
Updated all of the previously added extension method `<Compile>`
sections to include a `<Link>` section to improve formatting.
* Added <Link> Section for Dictionary Extensions
Added Missing <Link> Section for Dictionary Extensions
Commit migrated from https://github.com/dotnet/corefx/commit/3d4d8038d1a3f0c56d3046bc7494f30ecc35e67b
* Reduce memory load of ConcurrentCollections test
This test was hitting an OOM on the CI machines because it adds new items to a collection in a loop until a timeout is met. I modified the test to instead add a fixed number of items, regardless of time. This also reduces the total runtime of the Concurrent Collections tests from ~15 seconds to ~10 seconds on my local box.
* Increase Count Concurrency of test and move to Outerloop
Commit migrated from https://github.com/dotnet/corefx/commit/e7304db88d3ec6c86ce6a927df7e2385148d0c8c
GetTypeInfo is no longer a necessary step to get IsValueType so remove
the call to it (contributes to dotnet/corefx#16305).
Replace if-else ladder on == typeof(…) with switch on GetTypeCode so up
to a dozen tests becomes at most 3.
This makes it no longer necessary to test for enum types and get
underlying type, so don't.
Add a 64-bit type to the types covered in testing.
Commit migrated from https://github.com/dotnet/corefx/commit/f565fd56f89945cf69fee211885878f008397882
ConcurrentStack currently uses a randomized-backoff scheme, where under contention it spins for increasingly longer periods of time, with a duration influenced by some randomness. If the initial attempt at popping an item fails due to contention, it allocates a Random, then tries again one or more times, and then uses the randomness to influence backoff for subsequent attempts. While it's not clear to me that this scheme is optimal, we can at least delay the allocation of the Random (and the underlying cost it entails, like an int[] in its ctor) until it's actually used. Since it's typically not used for a few attempts, this significantly decreases the number of instances that get created under heavy contention.
Commit migrated from https://github.com/dotnet/corefx/commit/c0a0c55c10c820088a249991376251ad7e6eb7ae
* Marking code as unchecked (pt 9)
Additional unchecked for new test code and missed cases in BitConverter
* Marking code as unchecked (pt 9a)
Added unchecked to two casts in ManagedWebSocket
* CI test failure fixes
Overflow exceptions in:
- Windows NT Debug dotnet/corefx#3458
- OS X Debug dotnet/corefx#3357
* CI test failure fixes
Overflow exceptions in:
- Windows 7 Debug Outerloop (build 8)
- OS X Debug Outerloop (build 45)
* CI test failure fixes
Fixed overflow exception from OS X Debug Outerloop (build 46)
Commit migrated from https://github.com/dotnet/corefx/commit/7f6ac8bf97a84666ed3e7ef6b77c1a9470ae78c8
* Marking code as unchecked (pt 7)
Marking code that may intentionally lead to over or underflows with
unchecked in preparation of turning on CheckForOverflowUnderflow for
all projects (issue dotnet/corefx#3140)
* Marking code as unchecked (pt 7a)
Additional fixes from a debugging session on macOS
* Marking code as unchecked (pt 7b)
Added missing unchecked to ConcurrentBag
Commit migrated from https://github.com/dotnet/corefx/commit/0ebc867d6bad9d777dd61afb78d0445c86143b34
With one exception: System.Runtime.InteropServices.RuntimeInformation.
For the rest we will no longer ship packages.
Instead the types will be supported as follows:
1. In a netstandard2.0+ project via NETStandard.Library package's
netstandard.dll
2. In a netstandard1.x project via NETStandard.Library package and
closure which ship from servicing branches.
3. In a framework specific project via the framework's targeting pack
or framework package.
Commit migrated from https://github.com/dotnet/corefx/commit/d6bd0c5889c604bda6afcba4cd7848b7cb0fa6d3
* [WIP]Created src\tests.proj which is mostly building all tests
* Convert test project .builds to Configuration.props
* Fix test paths in targetingpack.props, move test-runtime.
* Move test-runtime under external.
* Rename RuntimeDir->RuntimePath in targetingpacks.props and
Xunit.Runtime.depproj.
* Remove test-runtime project.json from the SupplementalTestData list in
dir.targets.
* Remove XUnit.Runtime.depproj from tests.proj
* Convert test .builds files to Configuration.props.
* Revert "Convert test project .builds to Configuration.props"
This reverts commit dotnet/corefx@1efc4d9a02.
* Fix compilation error in System.Collections.Concurrent.Tests
* Fix condition in System.Collections ref project
* Fix two more Collections test project issues
* Add Configuration.props for System.Collections ref
* Fix TargetGroup conditions in System.Collections.Tests.csproj.
* Fix compilation problems with NameResoltion.Pal.Tests.
* Fix compilation errors in SqlClient Stress tests
* Fix IO.Compression.Performance tests compilation
* Fix compilation and configurations of System.Net.Http.Unit.Tests.csproj.
* Fix compilation issues in System.Private.Xml.Linq tests
* Disable XsltScenarios.Tests project, like it was before.
* Fix missing DefineConstants for System.Linq ref project.
* Fix compilation of System.Net.Primitives.Pal.Tests.csproj
* Fix compilation of System.Net.Primitives.UnitTests.Tests.csproj
* Fix compilation of System.Security.Cryptography.Cng.Tests.csproj.
* Fix compilation of System.Net.Primitives reference project
* Fix compilation of System.Net.Security ref project
* Fix compilation of SYstem.Net.Security.Tests.csproj
* Fix configuration of X509Certificates ref project
* Fix compilation errors in System.Net.Http.Unit.Tests.csproj
* Fix Common.Tests.csproj
* Fix System.Diagnostics.Debug.Tests.csproj
* Fix Microsoft.Win32.Registry.Tests.csproj
* Add runtime.native.System.Data.SqlClient.sni to external project
* Fix System.Diagnostics.TraceSource.Tests.csproj
* Fix System.IO.Compression.Performance.Tests.csproj
* Move supplemental test data into test-runtime/project.json
* Fix System.IO.FileSystem.Watcher.Tests.csproj
* Fix System.IO.FileSystem.Tests.csproj
* Fix System.IO.Pipes.AccessControl.Tests.csproj
* Fix System.IO.MemoryMappedFiles.Tests.csproj
* Fix System.IO.Pipes.Tests.csproj
* Fix System.Json.Tests.csproj
* Add missing supplemental test data for net security tests
* Fix resource names in System.Xml.XPath.XDocument.Tests.csproj
* Fix Assembly.Location test case
* Fix assembly loading paths in DefaultLoadContextTest.cs
* Fix issues in System.Runtime.Loader.Tests.csproj
* Fix RootNamespace in ResourceManager tests
* Mark OpenSSL tests as unsupported on Windows
* Fix RootNamespace in System.Xml.XPath.Tests.csproj
* Fix RootNamespace in System.Xml.XPath.XmlDocument.Tests.csproj
* Fix System.IO.Compression.Tests.csproj
* Add missing Configurations.props files for System.Net projects
* Fix compilation issues in WinHttpHandler tests
* Add fixes and a workaround for Linq.Expressions tests
* Add workaround for System.Runtime.Tests
* Use extension methods explicitly in Ref.Emit tests
* Hook up test projects into build
* Fix build configuration of Crypto.Primitives for netcoreapp
* Enable VB tests outside Windows
* Enable Mail tests outside windows
* Don't run Unsafe tests outside windows
* Don't build Unsafe tests outside Windows
* Don't build WebServer project outside of Windows.
* Fix corerun path for Unix tests.
* Fix casing of 'Native' directory in NETCoreApp private pkgproj
* Remove runtime-specific stuff from Xunit.Runtime.depproj
* Move tests into a separate project ('tests.msbuild') which isn't built in build.proj
* Remove duplicate types from NameResolution.Pal tests
* Skip tests in a project if there is no compatible configuration.
* Include internal socket types only on Windows in NameResolution tests
* Manually fix S.R.InteropServices configurations
* Rename tests.msbuild -> tests.builds
* Manually fix System.Text.Encoding.Tests.csproj configuration
* Manually fix System.Threading.Tests configuration
* Manually clean up System.Runtime.Tests.csproj
* Fix System.IO.FileSystem.Tests configurations
* Manually fix System.Globalization.Tests configurations
* Manually fix System.IO.Pipes.Tests configurations
* Manually fix System.IO.Compression.Tests configurations
* Manually fix System.Runtime.Extensions.Tests configurations
* Manually fix System.IO.MemoryMappedFiles.Tests configurations
* Manually fix S.Diagnostics.Process.Tests configurations
* Manually fix System.ComponentModel.TypeConverter.Tests configurations
* Misc PR feedback.
* Use HostRunnerName instead of HostRunner in Process tests
* Fix configurations for S.ServiceProcess.ServiceController.Tests
* Revert to using ConfigurationErrorMsg to check if tests should be skipped.
Configuration still defaults to 'Debug' even if there is no valid configuration.
Commit migrated from https://github.com/dotnet/corefx/commit/2c0352ec38f9f6f602ae819f0cafb02c1908f137