Zoltan Varga [Fri, 20 Nov 2015 22:48:56 +0000 (17:48 -0500)]
[runtime] Use the standard __MOBILE__ define instead of MOBILE for the mini tests.
Sebastien Pouliot [Fri, 20 Nov 2015 16:57:48 +0000 (11:57 -0500)]
[System] Remove internal Win32* classes from mobile builds
This reduce the size of System.dll and also removes some Win32 specific
p/invokes.
They cause native linking issues for tvOS as Xcode 7.1 does not allow
`-u` in bitcode-enabled builds so we have to call directly the symbols
and it must exists at (native) link time.
Sebastien Pouliot [Fri, 20 Nov 2015 15:07:37 +0000 (10:07 -0500)]
[System.ServiceModel.Internals] Do not include win32 p/invokes in mobile builds
This cause native linking issues for tvOS as Xcode 7.1 does not allow
`-u` in bitcode-enabled builds so we have to call directly the symbols
and it must exists at (native) link time.
Rolf Bjarne Kvinge [Fri, 20 Nov 2015 13:19:16 +0000 (14:19 +0100)]
[runtime] Revert breaking changes in MonoGHashGCType.
Xamarin.iOS and Xamarin.Mac uses this enum, and changing the values
causes us to break.
For Xamarin.Mac apps that do not bundle their mono, this would break
when the user updated their system mono.
Rolf Bjarne Kvinge [Fri, 20 Nov 2015 11:20:01 +0000 (12:20 +0100)]
[System.Drawing] Add ifdefs to source code used by Xamarin.iOS/Mac to make it compile there.
Zoltan Varga [Fri, 20 Nov 2015 11:15:56 +0000 (06:15 -0500)]
[aot] Add instances of LongEnumEqualityComparer which is used by EqualityComparer to compare long/ulong based enums.
Marek Safar [Fri, 20 Nov 2015 09:42:16 +0000 (10:42 +0100)]
Merge pull request #2254 from Sebmaster/fix-datasourceview
Fix NullReferenceException when reader fails in SqlDataSourceView
Zoltan Varga [Fri, 20 Nov 2015 07:29:39 +0000 (02:29 -0500)]
[corlib] Disable an attribute test which fails on mobile because of linking.
Alexander Köplinger [Fri, 20 Nov 2015 01:17:29 +0000 (02:17 +0100)]
[msvc] Remove outdated projects and configs to fix x64 build
Some of the profiler projects are no longer needed since the corresponding pieces were removed.
Update sln to only build required projects by default and update configurations in projects.
Fixes the Win64 build on Jenkins.
Sebastian Mayr [Fri, 20 Nov 2015 00:53:02 +0000 (01:53 +0100)]
Fix NullReferenceException when reader fails
If the reader execution in the try block fails, reader will stay null, but we later try to access reader.RecordsAffected. This raises a null reference exception which hides the original exception, making this particularly hard to detect.
Martin Baulig [Thu, 19 Nov 2015 20:19:42 +0000 (15:19 -0500)]
[System]: Implement X509Certificate2.Export(X509ContentType.Pfx).
(cherry picked from commit
e51b4ec6853e7e7ae6f7e862275a282a8c1e7904)
Zoltan Varga [Thu, 19 Nov 2015 19:19:08 +0000 (14:19 -0500)]
[x86] Fix OP_IMUL_OVF_UN clobbering edx in some cases. Fixes #36052.
Rolf Bjarne Kvinge [Thu, 19 Nov 2015 15:24:39 +0000 (16:24 +0100)]
Fix mcs build to use Thread.Abort.
Rolf Bjarne Kvinge [Thu, 19 Nov 2015 15:19:52 +0000 (16:19 +0100)]
Remove Thread API from the watch/tv runtime profiles as well.
Jonathan Pryor [Thu, 19 Nov 2015 15:39:54 +0000 (10:39 -0500)]
Merge pull request #2183 from joelmartinez/monodoc-ecmacref-fix
[monodoc] Fixed several issues with `.ToEcmaCref` method.
Jo Shields [Thu, 19 Nov 2015 14:20:21 +0000 (14:20 +0000)]
[msvc] Fix path to ml64.exe in masm.fixed.props
Miguel de Icaza [Thu, 19 Nov 2015 14:12:10 +0000 (09:12 -0500)]
Bring the Asin/Acos fix from CoreFX
Marek Safar [Thu, 19 Nov 2015 13:54:02 +0000 (14:54 +0100)]
[corlib] Update long/short timepatterns. Reference source DateTimeInfo uses different logic for single pattern extraction. Fixes part of #36003
Rolf Bjarne Kvinge [Tue, 6 Oct 2015 11:47:37 +0000 (13:47 +0200)]
Remove Thread.[Abort|Suspend|Resume] from TvOS/WatchOS.
In tests replace usages of Thread.Abort with Thread.Interrupt when it looks
like it can work, otherwise just disable the complete test.
Zoltan Varga [Thu, 19 Nov 2015 11:09:42 +0000 (06:09 -0500)]
[aot] Fix support for synchronized wrappers of gsharedvt methods.
Rolf Bjarne Kvinge [Thu, 19 Nov 2015 09:23:03 +0000 (10:23 +0100)]
[mono-api-info] Take return type into account when comparing methods.
Rolf Bjarne Kvinge [Thu, 19 Nov 2015 09:00:20 +0000 (10:00 +0100)]
[mono-api-info] Take into account parameters when sorting properties.
Rolf Bjarne Kvinge [Thu, 19 Nov 2015 08:59:36 +0000 (09:59 +0100)]
[mono-api-info] Sort attributes.
So that info files can be compared textually to test for api equality.
Zoltan Varga [Thu, 19 Nov 2015 07:00:23 +0000 (02:00 -0500)]
[jit] Fix memory leaks in the generic sharing code by making sure that values stored into an rgctx slot are never NULL, since otherwise the runtime would recompute them on every access. Fixes #36000.
Zoltan Varga [Thu, 19 Nov 2015 06:52:37 +0000 (01:52 -0500)]
[jit] Fix the gsharedvtcheck make target.
Alexander Köplinger [Wed, 18 Nov 2015 19:26:29 +0000 (11:26 -0800)]
[metadata] Remove unused empty struct from marshal.h
It breaks MSVC.
Alexander Köplinger [Wed, 18 Nov 2015 19:39:57 +0000 (11:39 -0800)]
[mini] Add MONO_API to mono_parse_env_options
We need this exported for our multi lib setup in MSVC.
Alexander Köplinger [Wed, 18 Nov 2015 22:18:15 +0000 (23:18 +0100)]
[msvc] Remove obsolete jay project files
We're requiring VS2013 now.
Alexander Köplinger [Wed, 18 Nov 2015 21:56:25 +0000 (13:56 -0800)]
[msvc] Fix msbuild warnings
OutDir/IntDir should end with trailing slash.
Don't override Linker OutputFile, instead copy jay via a PostBuildEvent to the correct dir.
Alexander Köplinger [Wed, 18 Nov 2015 19:51:55 +0000 (20:51 +0100)]
[msvc] Add missing files to libmonoutils.vcxproj
Alexander Köplinger [Wed, 18 Nov 2015 19:25:32 +0000 (11:25 -0800)]
[msvc] Update .def files
Sebastien Pouliot [Wed, 18 Nov 2015 17:30:27 +0000 (12:30 -0500)]
[tests] Skip Local name (incorrect) assumption for iOS/tvOS/watchOS/OSX in TimeZoneInfo tests
Zoltan Varga [Wed, 18 Nov 2015 16:48:33 +0000 (11:48 -0500)]
[runtime] Fix multiple inclusion of object-offsets.h
Ludovic Henry [Wed, 18 Nov 2015 13:57:25 +0000 (13:57 +0000)]
Merge pull request #2243 from konrad-kruczynski/process_exited_should_wait_in_background
Process.cs: adding a handler to Exited will make the program wait for the process to exit
Konrad M. Kruczynski [Wed, 18 Nov 2015 12:44:49 +0000 (13:44 +0100)]
Caller of Exited event should wait for process to exit in background.
Otherwise simply adding an event will make our program to live at least as long
as the created process lives.
Rolf Bjarne Kvinge [Tue, 6 Oct 2015 11:44:03 +0000 (13:44 +0200)]
[System] Exclude code that tries to load System.Windows.Forms.dll dynamically on mobile.
It won't succeed anyway.
Zoltan Varga [Wed, 18 Nov 2015 12:26:28 +0000 (07:26 -0500)]
[aot] Fix another memory leak.
Zoltan Varga [Wed, 18 Nov 2015 11:24:30 +0000 (06:24 -0500)]
Zoltan Varga [Wed, 18 Nov 2015 09:23:53 +0000 (04:23 -0500)]
Zoltan Varga [Wed, 18 Nov 2015 05:34:03 +0000 (00:34 -0500)]
[runtime] Add a DECL_SIZE2 macro usable from offsets files.
Zoltan Varga [Wed, 18 Nov 2015 05:06:49 +0000 (00:06 -0500)]
[runtime] Fix the lookup of nested types in type forwarders. Fixes #35447.
Zoltan Varga [Wed, 18 Nov 2015 03:54:02 +0000 (22:54 -0500)]
Fix a warning.
Zoltan Varga [Wed, 18 Nov 2015 03:36:22 +0000 (22:36 -0500)]
[aot] Fix a memory leak in init_amodule_got ().
Ludovic Henry [Wed, 18 Nov 2015 00:25:15 +0000 (00:25 +0000)]
Revert "[sgen] Remove sgen specific suspend code"
This reverts commit
64af68dd8d7ba888ad9e5d35dc9714df6f9d5963.
Martin Baulig [Tue, 17 Nov 2015 21:42:38 +0000 (16:42 -0500)]
Actually, really fix my last build - sorry for the breakage.
(cherry picked from commit
e95a4a2e35922fd68b3abf7b49685a93eebf599f)
Martin Baulig [Tue, 17 Nov 2015 21:04:48 +0000 (16:04 -0500)]
Fix my last commit.
(cherry picked from commit
4a5da6f7639a2ebeb4f7ac69fadec5be58a566a6)
Alexander Köplinger [Tue, 17 Nov 2015 21:03:53 +0000 (22:03 +0100)]
Merge pull request #2236 from akoeplinger/add-dataflow
[System.Threading.Tasks.Dataflow] Replace implementation with CoreFx version
Martin Baulig [Tue, 17 Nov 2015 18:43:16 +0000 (13:43 -0500)]
[Mono.Security]: Add 'X509Chain' to ICertificateValidator.InvokeSystemValidator and MonoTlsProvider.InvokeSystemCertificateValidator.
On OS X and Mobile, the X509Chain will be initialized with all the
certificates from the X509CertificateCollection, but not actually
built.
ServicePointManager.ServerCertificateValidationCallback can use the 'chain' argument
to get all the certificates from the server.
(cherry picked from commit
73e37f0ecfd403780d60f36d8b0d68f27987b256)
Martin Baulig [Tue, 17 Nov 2015 02:39:39 +0000 (21:39 -0500)]
[Mono.Security]: The default value of 'MonoTlsSettings.UseServicePointManagerCallback' is supposed to be true.
This fixes a regression where ServicePointManager.ServerCertificateValidationCallback
was not called when using WebClient.
(cherry picked from commit
5022db1956cd7dbde46928473800ff5b5e6b651e)
Ludovic Henry [Tue, 17 Nov 2015 15:48:26 +0000 (15:48 +0000)]
[threads] Fix build
Marek Safar [Tue, 17 Nov 2015 15:12:56 +0000 (16:12 +0100)]
[mcs] Set null operator barrier between invocation instance and its arguments. Fixes #33341
Zoltan Varga [Tue, 17 Nov 2015 15:02:23 +0000 (10:02 -0500)]
[arm] Avoid an assertion check in aot mode.
Zoltan Varga [Tue, 17 Nov 2015 15:01:33 +0000 (10:01 -0500)]
[runtime] Add MONO_ABI_SIZEOF macros similar to the existing MONO_ABI_ALIGNOF macros, use these to compute sizes of types.
Alexis Christoforides [Tue, 17 Nov 2015 14:57:39 +0000 (09:57 -0500)]
Merge pull request #2240 from UCIS/patch-6
Fixed hang in SslStreamBase when stream is closed during I/O
Ludovic Henry [Wed, 21 Oct 2015 15:49:00 +0000 (16:49 +0100)]
[sgen] Remove sgen specific suspend code
Alex Rønne Petersen [Tue, 17 Nov 2015 14:29:05 +0000 (15:29 +0100)]
Merge pull request #2241 from f00f/patch-1
Fixed typo
f00f [Tue, 17 Nov 2015 14:28:19 +0000 (15:28 +0100)]
Fixed typo
Ivo Smits [Tue, 17 Nov 2015 13:54:02 +0000 (14:54 +0100)]
Fixed hang in SslStreamBase when stream is closed during I/O
If the SslStreamBase is disposed while a read or write operation is in progress, the asynchronous I/O state is never marked as completed, resulting in synchronous Read/Write calls never returning. To fix this, the internal I/O callbacks should mark the asynchronous operations as completed, possibly with an error, even if the SslStreamBase is disposed.
Rolf Bjarne Kvinge [Tue, 17 Nov 2015 13:47:18 +0000 (08:47 -0500)]
Merge pull request #2201 from rolfbjarne/linker-better-xml-processing-errors
[linker] Provide better error message when an error occurs while processing xml descriptions
Alexander Köplinger [Tue, 17 Nov 2015 13:14:55 +0000 (14:14 +0100)]
Remove link to Wrench from README.md
We're retiring public Wrench and replacing it with Jenkins, see http://lists.ximian.com/pipermail/mono-devel-list/2015-November/043399.html
Rolf Bjarne Kvinge [Mon, 16 Nov 2015 18:30:55 +0000 (19:30 +0100)]
Add monotouch_*_runtime profiles for watchOS and tvOS.
Rolf Bjarne Kvinge [Tue, 17 Nov 2015 10:12:05 +0000 (11:12 +0100)]
Ignore extensions-config.h
Zoltan Varga [Tue, 17 Nov 2015 08:30:49 +0000 (03:30 -0500)]
Fix the build.
Zoltan Varga [Tue, 17 Nov 2015 07:16:25 +0000 (02:16 -0500)]
Remove obsolete interpreter embedding sample.
Zoltan Varga [Tue, 17 Nov 2015 07:12:29 +0000 (02:12 -0500)]
[jit] Remove unused mono_aot_register_globals () function.
Zoltan Varga [Tue, 17 Nov 2015 06:54:17 +0000 (01:54 -0500)]
[jit] Remove the nursery_bits from the wrapper info for the gc write barrier methods, its no longer needed after
85581ff1bb8b28141ec1823b7371efa5a14551bb.
Zoltan Varga [Tue, 17 Nov 2015 06:51:13 +0000 (01:51 -0500)]
[jit] Add a header file for aot-compiler.c.
Zoltan Varga [Tue, 17 Nov 2015 03:27:35 +0000 (22:27 -0500)]
[jit] Fix the check for emulation of div instructions in
9f253965d02d20b7fd39549ba07b35e76a69e48f.
Alexander Köplinger [Mon, 16 Nov 2015 23:25:26 +0000 (00:25 +0100)]
Merge pull request #2239 from xmcclure/interbals2
Minor: Style cleanup on internal headers (continued)
Andi McClure [Mon, 16 Nov 2015 23:17:21 +0000 (18:17 -0500)]
Minor: Style cleanup on internal headers (continued)
Previous patch missed some build files.
Andi McClure [Mon, 16 Nov 2015 22:26:17 +0000 (17:26 -0500)]
Merge pull request #2238 from xmcclure/interbals
Minor: Style cleanup on internal headers
Andi McClure [Mon, 16 Nov 2015 20:45:01 +0000 (15:45 -0500)]
Minor: Style cleanup on internal headers
For consistency, rename any -internal.h files to -internals.h. Also remove INTERBALS
Marcos Henrich [Mon, 16 Nov 2015 17:21:45 +0000 (17:21 +0000)]
Updated Assert.Equals to Assert.AreEqual
Alexander Köplinger [Mon, 16 Nov 2015 15:23:09 +0000 (16:23 +0100)]
[System.Threading.Tasks.Dataflow] Replace implementation with CoreFx version
We were seeing some random test failures on Jenkins with our Dataflow implementation.
Replacing it with Microsoft's CoreFx version fixed those and makes us more compatible.
While we'd ideally not ship this assembly at all with Mono (it doesn't ship with .NET),
we shipped it in the past and as such people might rely on it so we can't remove it.
The CoreFx commit this version was taken is
905a1940bcda0afdca2f14ceb2b0161ebc4d1d02.
Alex Rønne Petersen [Wed, 4 Nov 2015 19:16:28 +0000 (20:16 +0100)]
[arm] HACK: Disable fast TLS on ARM for now.
https://bugzilla.xamarin.com/show_bug.cgi?id=35178
Alex Rønne Petersen [Mon, 16 Nov 2015 15:07:18 +0000 (16:07 +0100)]
[linker] Always preserve Interlocked.Exchange<T> ().
The runtime expects to be able to find the generic variant of this method in
the metadata even when code is calling the `object` overload.
Alexander Köplinger [Mon, 16 Nov 2015 14:10:24 +0000 (15:10 +0100)]
Merge pull request #2228 from lambdageek/dev/sgen-timeouts
[test] sgen tests should behave nicer on slower machines.
Zoltan Varga [Mon, 16 Nov 2015 03:55:00 +0000 (03:55 +0000)]
[arm] Simplify the seq point code used for soft breakpoints.
Miguel de Icaza [Sun, 15 Nov 2015 15:12:03 +0000 (10:12 -0500)]
[Windows.Forms] add a warning to the Carbon driver when running on 64 bits
Zoltan Varga [Sun, 15 Nov 2015 13:32:36 +0000 (08:32 -0500)]
[runtime] Fix Thread.CurrentThread in non-root appdomains by setting the tls slot in start_wrapper, otherwise Thread.CurrentThread would create a new Thread object so there would be two. Fixes #35828.
Zoltan Varga [Sun, 15 Nov 2015 08:00:30 +0000 (03:00 -0500)]
Fix a warning.
Zoltan Varga [Sun, 15 Nov 2015 00:04:40 +0000 (19:04 -0500)]
[amd64] Make amd64_patch non-inline, it seems to be miscompiled by older clang versions (5.1).
Zoltan Varga [Sat, 14 Nov 2015 03:42:23 +0000 (22:42 -0500)]
[amd64] Enable div checks when running on tvos.
Zoltan Varga [Sat, 14 Nov 2015 00:48:50 +0000 (19:48 -0500)]
[jit] Emit div checks if MONO_ARCH_NEED_DIV_CHECK is enabled even when div instructions are not emulated.
João Matos [Fri, 13 Nov 2015 23:02:14 +0000 (15:02 -0800)]
Merge pull request #2233 from madewokherd/ucontextgregs
Do not define UCONTEXT_GREGS on win64.
Zoltan Varga [Fri, 13 Nov 2015 21:26:44 +0000 (16:26 -0500)]
Revert "[jit] Emit div checks if MONO_ARCH_NEED_DIV_CHECK is enabled even when div instructions are not emulated. Enable div checks for tvos."
This reverts commit
276824dd28c4b16ccd9ce9b71ec22cb59cce9bc3.
Revert this as it breaks on some android devices:
https://bugzilla.xamarin.com/show_bug.cgi?id=35844
Aleksey Kliger [Fri, 13 Nov 2015 20:29:53 +0000 (15:29 -0500)]
[test] Give the sgen tests more time.
Aleksey Kliger [Thu, 12 Nov 2015 22:15:01 +0000 (17:15 -0500)]
[test] Make sgen tests behave nicer on slower machines.
* TestDriver.cs Add `TestTimeout` utility to check how much time CI
allocated for the test.
* sgen-domain-unload-2.cs print warning if running low on time.
* sgen-new-threads-dont-join-stw.cs print progress dots and a warning
when running low on time.
Martin Baulig [Fri, 13 Nov 2015 18:04:03 +0000 (13:04 -0500)]
[Mono.Security]: Cleanup the internal `Mono.Security.Interface.ICertificateValidator'.
* ICertificateValidator.SelectClientCertificate(): return bool, indicating whether
a certificate has been selected or the caller should use its default
implementation (if it has any).
* ICertificateValidator.ValidateCertificate(): new common function for both client
and server certificates; replaces ValidateChain() and ValidateClientCertificate().
* MonoTlsProvider.InvokeSystemCertificateValidator(): return bool, indicating whether
the certificate has been validator or the default system validator should be used.
(cherry picked from commit
42421eec1e91cbcb09a531a77df296da9e5e9f5d)
Vincent Povirk [Fri, 13 Nov 2015 18:58:36 +0000 (12:58 -0600)]
Do not define UCONTEXT_GREGS on win64.
Rodrigo Kumpera [Fri, 13 Nov 2015 18:12:15 +0000 (13:12 -0500)]
Merge pull request #2227 from esdrubal/tzparse
[corlib] Fixes TimeZoneInfo.ParseTZBuffer abbrevs.
Marcos Henrich [Thu, 12 Nov 2015 19:00:43 +0000 (19:00 +0000)]
[corlib] Fixes TimeZoneInfo.ParseTZBuffer abbrevs.
Context: https://bugzilla.xamarin.com/show_bug.cgi?id=31432
In a few android devices TimeZoneInfo.ParseTZBuffer was failing ito
parse Europe/Moscow with:
at System.ThrowHelper.ThrowKeyNotFoundException ()
at System.Collections.Generic.Dictionary`2[System.Int32,System.String].get_Item (Int32 key)mscorlib/system/collections/generic/dictionary.cs:176
at System.TimeZoneInfo.ParseTimesTypes (System.Byte[] buffer, Int32 index, Int32 count, System.Collections.Generic.Dictionary`2 abbreviations) [0x0002f] in mcs/class/corlib/System/TimeZoneInfo.cs:1293
at System.TimeZoneInfo.ParseTZBuffer (System.String id, System.Byte[] buffer, Int32 length)
It was failing while getting the third index [3] from] from abbrevs.
abbrevs added values were the following:
[0, MMT]
[1, MT]
[2, T]
[4, MST]
[5, ST]
[6, T]
[8, MDST]
[9, DST]
[10, ST]
[11, T]
[13, S]
[15, M]
[17, MSK]
[18, SK]
[19, K]
[21, EET]
[22, ET]
[23, T]
[25, MSD]
[26, SD]
[27, D]
[29, EEST]
[30, EST]
[31, ST]
[32, T]
Index 3 was not added because its values is an empty string, as indexes
with empty values are used in this case we are now adding them to the
abbrevs dictionary.
Fixes #31432
Marcos Henrich [Thu, 12 Nov 2015 18:45:03 +0000 (18:45 +0000)]
[corlib] Tests TimeZoneInfo.ParseTZBuffer
Context: https://bugzilla.xamarin.com/show_bug.cgi?id=31432
Tests TimeZoneInfo.ParseTZBuffer with Europe/Moscow data that thrown
at System.ThrowHelper.ThrowKeyNotFoundException ()
at System.Collections.Generic.Dictionary`2[System.Int32,System.String].get_Item (Int32 key)mscorlib/system/collections/generic/dictionary.cs:176
at System.TimeZoneInfo.ParseTimesTypes (System.Byte[] buffer, Int32 index, Int32 count, System.Collections.Generic.Dictionary`2 abbreviations) [0x0002f] in mcs/class/corlib/System/TimeZoneInfo.cs:1293
at System.TimeZoneInfo.ParseTZBuffer (System.String id, System.Byte[] buffer, Int32 length)
Ludovic Henry [Thu, 12 Nov 2015 18:49:43 +0000 (18:49 +0000)]
[IO] Dump handle when we run out of them
When running out of handle, it's hard to know exactly why. Dumping them
will help troubleshoot handle leaks.
Marek Safar [Fri, 13 Nov 2015 08:26:52 +0000 (09:26 +0100)]
Bump referencesource
Zoltan Varga [Fri, 13 Nov 2015 03:58:28 +0000 (22:58 -0500)]
[jit] Emit div checks if MONO_ARCH_NEED_DIV_CHECK is enabled even when div instructions are not emulated. Enable div checks for tvos.
Zoltan Varga [Thu, 12 Nov 2015 23:48:59 +0000 (18:48 -0500)]
[arm] Fix register assignments during hfa parameter passing. Fixes pinvoke_ppdcd.exe.
Zoltan Varga [Thu, 12 Nov 2015 23:07:09 +0000 (18:07 -0500)]
[runtime] Rename iltests.il.in back to iltests.il, architecture specific tests should be handled using Category attributes.
Radek Doulik [Thu, 12 Nov 2015 19:57:40 +0000 (20:57 +0100)]
[linker] do not try to iterate thru null array
- fixes the case when custom attribute instance constructor contains
null value for System.Type[] array
Martin Baulig [Thu, 12 Nov 2015 19:15:39 +0000 (14:15 -0500)]
Rewrite the test case from commit
b503b87a to not use Assert.IsInstanceOfType().