* Adding cross framework serialization and blob sanity check for serializable Exception types
* Add AggregateException equality check and check InnerException of Exception type
* Refine test data for exceptions
* Manual StackTrace override for Exception serialization tests
* Improved exception serialization data
Commit migrated from https://github.com/dotnet/corefx/commit/a534c0ebbd3c5741f97590ece32f1b31645f0994
* Moving PlatformDetection to Corefx.Private.TestUtilities assembly
The purpose of this change is to clean up all test projects instead of including the PlatformDetection code inside every test project, we’ll have it in the Corefx.Private.TestUtilities.
I have refactored the PlatformDetection to split the different implementation of Windows and Linux. If we need to do more refactoring there we can do it later as needed.
* Fix Linux BB
* Update the xunit package reference
* Fix wrong condition on one of the tests
* Update the ConditionalFact/Theory to use Type as a parameter
Commit migrated from https://github.com/dotnet/corefx/commit/878e2fcf5a9f1068015e5fada9231088663e3490
* Fix serialization tests to handle a couple of AoT differences:
1. AoT doesn't return ByteEqualityComparer from EqualityComparer<byte>.Default, so create it with reflection instead
2. CoreCLR changes the _version field of List differently than both AoT and NetFX, so pass arrays to the IEnumerable constructor of a few collections, which causes the _version fields to agree. Also updates the stored blobs to reflect this.
Commit migrated from https://github.com/dotnet/corefx/commit/7639beea9ff8be752b46bbe084093cd43bec6e35
* Implement argument pasting in RemoteInvoke
* Add tests for RemoteInvoke fixes
* Update RemoteInvoke tests now that quoting is unecessary
* Fix netfx tests
The extra parameter is empty in netfx so was pasted to ""
* Address PR feedback
Commit migrated from https://github.com/dotnet/corefx/commit/232f48884efed22d228ae4a9450b37fbfa92b861
* Reenable sanity check
* Avoid different blobs for CookieContainer dependent on machine configuration
* Fixing diffent blobs for CompareInfo as it used machine config depdent values
* Fixing different in DataTable and DataSet
* Fixing CookieCollection missing field in serialization
Commit migrated from https://github.com/dotnet/corefx/commit/3ba241487054331c32ca5c1c13426de37ddd97c3
* Adding TypeForward to PathListComparer, CookieCollection member, full-mode tests, SizeF publickeytoken fix
* Making FormatterAssemblyStyle explicit
* Update blobs after CompareInfo culture field added to serialization payload
* Added blob integrity check
* Remove unnecessary operation which has no impact on netfx serialization
* Putting pragma around the unused field...
* Setting m_version value to include it in the serialization payload. Remove static versions for blob comparison
* Update compare logic
* update blobs
* disable checking if blob has changed
Commit migrated from https://github.com/dotnet/corefx/commit/fe3678109c8897854f7c943d2a0e44a127852d54
* wip: add stubs for custom isEqual
* Updated blobs, small code refactoring, disabled CookieContainer test
* Fixed netfx471 detection
* add custom equals for graph with cycles
* fix few more comparers
* Merge
* fix few more test cases
* fix few more types, fix GetExtensionMethod to work with parameters with same type name but different generic params
* finish tests (2 comparisons are commented out: search for TODO)
* Adding TypeForward for DictionaryNode
* Updating blobs
* Update Cookie hashes, adding TypeForwards, removing unnecessary equality checks for CookieCollection
* Reenabling SortedDictionary test
* Update blobs
* make cookie.Timestamp to roundtrip correctly
* regenerate netfx and corefx blobs to account for Cookie.Timestamp change
* make regex fix the blob for ObjectWithArray
* fix ObjectWithArray netfx test failure
* Replacing Dictionary with Hashtable for desktop serialization support
* Update blobs
* Fixing a lot of TypeForwards, adding another hashtable test, other fixes
* Adding a few more TypeForwardedFrom attributes
* Updating the coreclr version, disabling CookieContainer test
* Update blobs
* Disabling CompareInfo test --> waiting for coreclr
* generate test cases
* update blobs, comment out not working cases
* fix null equality checks for new test cases and reenable them
* PR feedback addressed
* Fixed a typo...
* Updating used coreclr version, enabling compareinfo test again
Commit migrated from https://github.com/dotnet/corefx/commit/cdfb6ecf11cae3f43d35233852ef422cb12ef3d8
This change to enable remote execution of all corefx tests in UAP. Because the remote execution code for UAP is using WinRT APIs and to avoid forcing adding UAP configuration to all test projects, we factor the remote execution code into its own test library (called TestHelper) which is cross compiled.
Commit migrated from https://github.com/dotnet/corefx/commit/eb2f543b189e8f7f9ae4c31e832ac9d3c22bb41a
We initially left SerializationFieldInfo out of corefx as it wasn't necessary given previous goals around BinaryFormatter; but now it is. I've ported the code almost as-is from desktop, with some minor style tweaks, and a few necessary changes, e.g. using FieldInfo instead of RuntimeFieldInfo, as the latter isn't accessible. I've not done anything to minimize allocations / improve perf, etc., as that can be done in the future, and the results of all of this gets cached.
Changing this required regenerating a few of the serialization blobs in the tests. I also added a test for a case we didn't previously cover, a [Serializable] type derived from a non-serializable type.
Commit migrated from https://github.com/dotnet/corefx/commit/82e327c0e947b4e3537d1189ce44025b8b868da1
* Fix byreflike test for UAPAOT
* More fixes for UAP AOT BinaryFormatter tests:
* Making Cookie serialize correctly (I'm not sure why this wasn't needed for CoreCLR)
* More rd.xml
* Avoid private reflection in the test Comparer comparison
Commit migrated from https://github.com/dotnet/corefx/commit/c1fe8a8352ba633abfad979ea2be6ade428f505b
* Manually build mscorlib shim to allow for internal type forwards
* prepare tests for netfx->core deserialization changes
* update netfx serialized data
* change hash updater so it doesn't use hard-coded path
* Code cleanup for binary serialization
* Changed ListT to ArrayList in CookieCoolection for cross serialization
* Merge
* Changed observablecollection typeforwards that already had typeforwards on netfx
* Adding ValueTuple blobs for netfx471
* Add internal types which need to be forwarded
* Pull mscorlib shim in along with windows.winmd
To build UAP refs and libs we need an mscorlib shim. So for the build
we pull one in from packages and it will get overwritten when we build
the final one as part of our shim builds
* Removed not needed typeforward and added description
* Remved typeforwards from nested types
* Fixed generic type syntax
* Updated coreclr version, ifdefed imports for netcoreapp
* disable netfx serialization for now
* Merge error fixed
* Update blobs after coreclr changes
* Adding ValueTuple manual typeforwards
* Renamed serialization variables for SortedSet
* Disabling TreeSet<,> serialization support (for now)
* Exception internal data storage typeforward added
* Fix type conflict for mscorlib shim in uapaot configuration
* Split the runtime and ref mscorlib shim
We need to build the ref mscorlib shim only against the reference
assemblies so we still build in shims.proj. However the runtime
mscorlib shim needs to have access to internals so we build it against
the runtime implementation using a manual project.
Commit migrated from https://github.com/dotnet/corefx/commit/ca49bfbfd64351fddba56f2141b90841b8561eb7
The MemberData is enumerated promptly, such that even though we're yielding the graph object, subsequent modifications to that same object are manifested prior to that object being tested, and it doesn't match the serialized version.
Commit migrated from https://github.com/dotnet/corefx/commit/1de4eb9f6b799f5e12215d0f15647987a2a42e3b
Lazy was completely rewritten for .NET Core and has an entirely different format than desktop. Lazy can also wrap an Exception that occurred from trying to instantiate the object, and the only exception types that are serializable as of now in core are the base Exception and AggregateException. As such, we're cutting it from the list of supported types in 2.0. An easy workaround is simply to do what the implementation does: serialize lazy.Value instead of lazy.
Commit migrated from https://github.com/dotnet/corefx/commit/981a333c4a3b8af9f2f3f11f7e55c862d4b66528
Serialization of a WeakReference is dubious at best, as when it's deserialized, there won't be any strong references to the deserialized object it wraps, such that it's then immediately available for GC and will likely be gone by the time we go to look at it.
Commit migrated from https://github.com/dotnet/corefx/commit/f2e925df4b2d75caab0aa3160a51e998dcdd577d