* Enable xUnit2000 analyzer
This commit enables xUnit2000 (Constants and literals should be the expected argument) and apply fixes for the existing violating codes.
* a Massive commit fixing xUnit2000
* fixing some 2003 errors
* Fix mistakes
* Fix missed errors for unix
Commit migrated from https://github.com/dotnet/corefx/commit/93d7aa1c1737b6da29d04b78557215e18eb786d4
* Removed null checks on value types and enabled xunit 2002
* Updated Fill_OpenDataReader_Throws to use range check
Updated Fill_OpenDataReader_Throws to use range check for passing path
* Removed uneeded asserts and updated others
- Removed any assert for a valuetype where it was succeeded by a value type assertion (e.g. Assert.Equal(1, 1))
- Updated reflection tests to check flags for the specified scenario
* Update src/Microsoft.VisualBasic.Core/tests/FileSystemTests.cs
Co-Authored-By: Jeremy Barton <[email protected]>
* Update src/System.Reflection/tests/AssemblyNameTests.cs
Co-Authored-By: Jeremy Barton <[email protected]>
* Fixed failing reflection tests and removed Assert.NotNull for enum
* Pulled ruleset up from master to merge
* Cleaned up assert ordering for TestGuid
* Updated TestResponseWithoutContentEvents
- Asserted for 200 OK based on response from DefaultAzureServer + EmptyContentHandler
Commit migrated from https://github.com/dotnet/corefx/commit/c96e389f803b043753558878fefb575f3f85c934
* Replace "Assert.Equal(true, " with "Assert.True("
* Replace "Assert.Equal(false, " with "Assert.False("
And fix a few Assert.Equal(true cases that deal with objects and thus need to be reverted.
* Replace "Assert.StrictEqual(true, " with "Assert.True("
* Revert a few changes where true/false was being compared to object
* Address PR feedback
Commit migrated from https://github.com/dotnet/corefx/commit/1296bc8386a7283e319ddf723282f16651f9ea5f
* Making Exceptions serializable
* Remove EventLog serialization exceptions from tests since they won't work on non-Windows platforms
* Fix build and add internal exceptions as well
* Add parameter-less constructor to RethrowException
* Adding PR Feedback
* Fix allConfigurations build
Commit migrated from https://github.com/dotnet/corefx/commit/7075587321a1b6b59248b1a6c7ea04fc803eab96
* Factor out repo restore into seperate props/targets
* Use configuration system msbuild sdk
* Remove XUnit.Runtime.depproj
* Remove TargetGroup usages in test projects
* Fix ILLink configuration
The ILLink package contains netcoreapp2.0 assets which are compatible
with netstandard2.0. Removing the old TargetFramework to restore
successfully.
* Remove usages from TargetGroup in Directory.Build.props
* Remove dead net4* configurations
* Change tests.builds to tests.proj sdk proj
* Make externals dir proj an sdk project
* Consume Microsoft.DotNet.CoreFxTesting as an msbuild sdk
* Use runtimeconfig.template.json
* Remove SupplementalTestData
* Map shared framework version to product version
* Stop binplacing tests
* Move some tool depprojs to targets during restore
* Remove dead code
* Use PackageReference instead of RefFromRuntime in test
* Disable using an apphost
* Copy compression testdata manually cause unicode bug
* Remove target batching in optimizationData
* Reference packaging tools from CoreFx.Private.TestUtilities
Commit migrated from https://github.com/dotnet/corefx/commit/c4c1985531cc1f25c805bbc4801b85c98e0dfee0
* React to APICompat changes enabling reverse APICompat for facades
* Fix UAP and NETFX reverse APICompat issues
* Fix reverse APICompat baseline for allconfigurations build
* Manually update to latest APICompat
* Manually update to latest CoreCLR and fix issues
* Baseline System.Threading.Tasks
* Revert "Manually update to latest CoreCLR and fix issues"
This partially reverts commit dotnet/corefx@ee800617b6.
I'm keeping the baseline changes which will be needed when we get a new update.
* Temporarily baseline DiagnosticCounter API gaps
This can be removed when get a new CoreCLR
That's currently blocked due to regressions in tests.
Commit migrated from https://github.com/dotnet/corefx/commit/035343743c5a7f67be8a2a2f36913a3c43893b76
* Clean up lots of string.Format usage
This PR does a few things:
- Adds new SR.Format overloads, in particular to support accepting an IFormatProvider as the first argument.
- Fixes a bunch of calls to string.Format that should have been using SR.Format. This not only helps in AOT builds where we want to be able to more cleanly remove resource strings, it enables easier auditing of the remaining string.Format uses to determine whether there are more appropriate implementations.
- Replaces some string.Format uses, in particular in asserts, with easier to read and maintain string interpolation
- Replaces some string.Format uses with string concatenation where it's simple and cheaper
- Fixes a bunch of SR.Format(SR.Something) calls where the SR.Format part is extraneous and should just be removed.
- Replaces a bunch of Debug.Assert(false, ...) calls with Debug.Fail(...). This isn't directly related to string.Format, but I started this cleanup as part of cleaning up asserts that were using string.Format, and then ended up accidentally merging the chain into the same commit, and decided it was simple enough that I should just leave it rather than trying to separate it out again.
* Address PR feedback
* Fix breaks due to lower netstandard builds
Commit migrated from https://github.com/dotnet/corefx/commit/a6f76f4f620cbe74821c6445af3f13e048361658
A corrupted BinaryFormatter stream can result in a BinaryObjectInfo getting constructed before the ObjectManager is constructed, resulting in the BinaryObjectInfo not having a reference to the ObjectManager. Attempts to use it then hit a null reference exception.
Commit migrated from https://github.com/dotnet/corefx/commit/7622efd2dbd363a632e00b6b95be4d990ea125de
* Auto-generate the reference assemblies
* Add back type forwards.
* Revert "Add back type forwards."
This reverts commit dotnet/corefx@3acf74aabb.
* Add back TypeForwardedTo in .Forward.cs files
* Add new type forward files to the csproj files
* Add back if-defs and move TestUtilities comment from ref to source
* Remove duplicate definitions, delete unnecessary manual files,
* Fix build breaks
* Add back missing AsyncMethodBuilderAttr to S.Runtime ref
* Fix typo between XmlDocument and XPath.XDocument
* Add type forward fild missed from previous commit
* Fix ECDiffieHellmanCngPublicKey internal ctor for netfx 4.6.1
* Remove "this type was moved to comments" from the type forwards.
* Add back the Xml and Debugger* attributes to Xml.ReaderWriter
* Add back struct layout attributes
* Add back attributes missing (highlighted from api compat)
* Add missing toolbox item attribute in s.data.common.
* Add missing struct layout attributes and remove unnecessary additions
* Add back InterfaceTypeAttribute
Commit migrated from https://github.com/dotnet/corefx/commit/16689aa0a933517dc45465fc6edb6223222414a6
* Make System.Runtime.CompilerServices.Unsafe inbox
Fix a couple places where we wanted to use it from other inbox assemblies but couldn't.
Unsafe remains as a package and newer versions of Unsafe will replace the inbox Version,
permitting us to add API over time.
* Update Rune tests to use TryEncodeToUtf8Bytes directly
* Add temporary suppression to package tests
Commit migrated from https://github.com/dotnet/corefx/commit/9074d9f5b513a95b7eac9ba1112069c29230d1d2
* Add SyncSortedList serialization tests and remove SyncRoot
* Disable blob comparison for SyncSortedList
On UWP we get different blobs for SyncSortedList as reflection behaves
differently as the amount of types that we tests is less than in
.NET Core and .NET Framework. The order of fields that are serialized
into the payload are different in such a case.
Therefore we just disable the blob comparison for this type entirely.
Commit migrated from https://github.com/dotnet/corefx/commit/de591233c04efa019ea2aed0a8fc5181f6d4210b
* Fix EqualityExtensions handling of enumerables
The CheckSequenceEquals method is erroneously testing an enumerable against itself rather than against the intended other. Luckily this didn't mask any failures in existing test data, but it does in new test data being added.
* Fix serialization of arrays containing DateTimes
When DateTimes are serialized individually, DateTime's serialization ctor/GetObjectData are used. But when it's serialized as part of an array, a different path is taken that serializes it via a separate BinaryFormatter-specific "I know what this type is" mechanism, and that's currently dropping the Kind information from the DateTime, due to the necessary API on DateTime being internal and not available to BinaryFormatter.
Commit migrated from https://github.com/dotnet/corefx/commit/0b613fa6ffc60e80754346c1ea5f97a17f6aa3dd
* Initial check-in for System.Text.Json library and solution
* Auto-generate the reference assembly
* Provide an overview README and roadmap
* Change the solution GUID to be unique
* Fix package description nit
* Change to MIT license instead of GPL
* Fix file extension of images to png
* Address PR feedback and only support netcoreapp
* Fix the configuration props and project files
* Add comments to the JsonTokenType enum
* Add an internal class for commonly used constants when reading JSON.
* Add a comment handling enum for lenient JSON reading
* Add a JsonReaderOptions struct to provide extensible customization of
JsonReader behaviour
* Add a JsonReaderException class which is thrown when we see an invalid
JSON text
* Add the skeleton for the JsonUtf8Reader ref struct and add files to
csproj
* Add JsonReaderState, ThrowHelper, and Strings resource file
* Address PR feedback, remove OS-specific configurations
* Complete the implementation of core JsonReader APIs for reading spans
* Update the reference assembly by auto-generating it
* Add unit tests and TryGet APIs
* Add XML comments to describe the JsonUtf8Reader at a high level
* Fix config and csproj to reference S.R.CS.U from Corelib
* Rename type from JsonUtf8Reader to Utf8JsonReader
* Remove remnants of ReadOnlySequeunce related fields/properties
* Add the remaining TryGetValueAsX APIs
* Change JsonReaderState ctor to accept JsonReaderOptions instead
* Seal the JsonReaderException class
* Rename LineBytePosition to BytePositionInLine
* Fix typo in ArrayEndWithinObject exception message
* Capitalize the acronym JSON within exception messages.
* Override GetObjectData and add a private deserialization ctor on
JsonReaderException
* Be explicit with lessThan in the IndexOfAny call site
* Only use ulong when Options isn't AllowComments to align stack usage
* Rename IndexOfAny helper to IndexOfOrLessThan
* Remove stray comment and fix xml comment for BytesConsumed
* Braces everywhere
* Rename localCopy to localBuffer to tie it to _buffer
* Add IsDigit and IsHexDigit helper methods
* Rename Solidus to Slash, ReverseSolidus to BackSlash, and Use Asterisk constant
* Use static encoder and avoid unnecessary allocation.
* Combine multiple TryParse calls that only differ by standardFormat
* Use SR.Format instead of string.Format and add debug.fail for default
case
* Make the exception as serializable and add test to BinaryFormatterTestData
* Fix exception messages, avoid printing control characters, and remove
unnecessary else.
* Make sure all exception messages are consistent and that they make sense
in context.
* Fix and add new comments, rename internal enum values, and remove
JsonLab
* Throw InvalidCastException from TryGetAsX if token type doesn't match
* Resolve TODOs, add issues, fix search for end of string, and remove recursive calls + add more tests.
* Use Unicode escape sequences for non-ASCII characters in tests.
* Add more tests related to skipping and consuming comments.
* Allocate the stack lazily, only when depth actually surpasses 64.
* Add a netcoreapp config to
System.Runtime.Serialization.Formatters.Tests.csproj
* Remove unnecessary DefineConstants property in test csproj
* Use Invariant Culture where necessary to avoid tests failing on es-ES
machines
* Fix up nits in the exception messages
* Add an IsTokenTypePrimitive helper method and fix comment spelling
* Use helper, use while(true) instead of goto, and change TryGet methods
to throw InvalidOperationException
* Shorten CommentHandling enum values and rename Default to Disallow
* Fix "is the stack empty" check in EndObject/EndArray
* Add previous token type to state and update it when token type is not a
comment
* Include comment delimiters as part of comment token, fix Debug.Assert
and tests.
* Add helper to avoid code duplication
* Add temporary workaround for Utf8 double parsing issue
Commit migrated from https://github.com/dotnet/corefx/commit/43759525e9a01fb9caedc0fb2281db5c65a16f65