Commit Graph
286 Commits
Author SHA1 Message Date
Miguel de Icaza 0699e4da36 Fix warnings in mscorlib's Test suite + bring a couple more tests + fix thread rename test 2014-09-23 10:56:04 -04:00
Zoltan Varga 68e5cc395f [bcl] Add a missing check to TypeBuilder.CreateType (). Fixes #22059. 2014-08-18 21:38:50 -04:00
Zoltan Varga 8d9e02de31 [runtime] Fix decoding of jagged arrays in custom attributes. Fixes #19825. 2014-05-15 19:27:10 +02:00
Rodrigo Kumpera 055eeccb76 [bcl] Add regression test for bxc #16096. 2013-11-18 14:26:40 -05:00
Rodrigo Kumpera a700784767 [runtime] Don't allow execution of dynamic assemblies without run access. Fixes #7126 2013-08-21 12:08:11 -04:00
Atsushi Eno 88dadaaf10 Revert "Revert "Fix bug #7829 - do NOT reject ConstructorInfo in DynamicILInfo.GetTokenFor().""
This reverts commit 0ef5f49c1f.
2013-08-19 12:13:38 +09:00
Atsushi Eno 0ef5f49c1f Revert "Fix bug #7829 - do NOT reject ConstructorInfo in DynamicILInfo.GetTokenFor()."
This reverts commit b43211d101.
2013-08-18 15:34:37 +09:00
Atsushi Eno b43211d101 Fix bug #7829 - do NOT reject ConstructorInfo in DynamicILInfo.GetTokenFor().
It is only one of probably many reasons that prevents Jurassic JavaScript engine.
2013-08-18 15:31:40 +09:00
Marek Safar 6d132a7c23 Remove generated file dependency to make fresh checkout tests work out of box 2013-03-07 09:31:47 +01:00
Rodrigo Kumpera 8343dbe179 Add a test case for #10122. 2013-02-07 19:22:14 -05:00
Andres G. Aragoneses df4a73d70f [System.Reflection.Emit] Store dynamic assemblies after the static ones
AssemblyBuilder class was adding generated dynamic assemblies at the
beginning of the list of the assemblies of the current domain, instead
of at the end.

This not only is not the behaviour of MS.NET but was inconsistent to
previous calls to the CurrentDomain.GetAssemblies() method, which would
return assemblies in different positions.

If code was relying on the order of these assemblies being returned (i.e.
to find the first type in the loaded assemblies that conforms to certain
requirements), it would result in unexpected behaviour if used along with
frameworks that mock/stub types on the fly, such as RhinoMocks, FakeItEasy
or other Castle.DynamicProxy-based ones.

This fixes BXC#10004:
https://bugzilla.xamarin.com/show_bug.cgi?id=10004

Patch contributed under the terms of MIT/X11 licence.
2013-02-03 19:12:25 +00:00
Zoltan Varga 56275bc16b Remove some special case code from mono_image_get_fieldref_token () which no longer seems to be needed. Fixes #9531. 2013-01-14 22:15:12 +01:00
Zoltan Varga 3cfe5adf95 Properly inflate arrays of generic parameters in resolve_object (). Fixes #7964. 2012-11-01 15:41:20 +01:00
Konrad M. Kruczynski 5839ca732b Added missing spaces. 2012-06-09 19:46:09 +02:00
Konrad M. Kruczynski aef3e78304 Reduced code duplication. 2012-06-09 19:43:31 +02:00
Konrad M. Kruczynski 02080f980e Fix for creating dynamic method with owner being array or iface.
It shouldn't be possible, according to MSDN documentation. Two
test cases included.
2012-06-09 19:38:04 +02:00
Miguel de Icaza ae0feab435 Removal of NET_1_1 defines and some NET_2_0; Both defines are true these days in Mono, no versions prior to 2.0 are supported 2012-06-01 18:04:24 -04:00
Gleb Golubitsky a0181c6c91 Fixing formatting glitches in my previous bug #3912 solution
Signed-off-by: Gleb Golubitsky <[email protected]>
2012-03-15 18:06:25 +02:00
Gleb Golubitsky 2aa0c70246 test case
Signed-off-by: Gleb Golubitsky <[email protected]>
2012-03-15 17:12:49 +02:00
Marek Safar 0c7782ddc4 Convert some old nunit tests 2012-02-27 16:59:01 +00:00
Zoltan Varga 929b66f583 Get rid of IsCompilerContext, mcs no longer uses SRE. 2011-11-06 19:36:36 +01:00
Marek Safar d6b4a3cc3f Move some async types to corlib 2011-09-19 15:01:21 +01:00
Sebastien Pouliot 232b6428d8 More fixes for running unit tests under NET_2_1 profile 2011-09-12 10:48:12 -04:00
Zoltan Varga 866ea36635 Fix some tests broken by some NET 4.0 changes. 2011-07-01 02:32:25 +02:00
Rodrigo Kumpera c357ed676a Regression test #696817 2011-05-30 18:31:50 -03:00
Zoltan Varga ea353d283d Add checks to ParameterBuilder.SetConstant () to avoid an assert in the runtime. Fixes #684438. 2011-04-10 20:27:58 +02:00
Marek Safar 47143ea89d Fix invalid il body for few tests 2011-03-08 14:10:17 +00:00
Zoltan Varga 682d244754 Implement some DynamicILInfo methods. 2011-03-07 20:19:04 +01:00
Jb Evain 4e4e92f4fa Add test for bug 665788 2011-01-20 16:36:37 +01:00
Rodrigo Kumpera 80e7e4d92b Check for null and valuetypes.
* CustomAttributeBuilder.cs (Initialize): Check if we are
	not passing null as values to valuetypes as this is invalid.

	Fixes #515938
2010-11-30 14:54:27 -02:00
Rodrigo Kumpera 53522f1963 Check for declaring type.
* TypeBuilder.cs (GetField): Check if the declaring type
	matches the supplied type gtd.

	* TypeBuilderTest.cs: Add regression test.

	Fixes #649237
2010-10-26 14:17:33 -02:00
Rodrigo Kumpera 1f5fc722bb Add regression test for #649017. 2010-10-25 19:47:45 -02:00
Rodrigo Kumpera 8f1e86cc79 Checks the constructor declaring type.
* TypeBuilder.cs (GetConstructor): Check if the ctor
	declaring type is the right one and the same as type.

	* TypeBuilderTest.cs: Add regression test.

	Fixes #648391
2010-10-22 17:57:00 -02:00
Rodrigo Kumpera 4ebfe2e4b0 Add regression test for #640780 2010-10-19 11:47:03 -02:00
Rodrigo Kumpera 53419ebdc8 Handle dynamic methods as managed.
* mini-exceptions.c (mono_find_jit_info): Treat
	dynamic method wrappers as managed methods.

	* DynamicMethodTest.cs: Add test for GetCurrentMethod.

	Fixes #640702
2010-10-11 14:12:32 -03:00
Jb Evain 5e1c4a34d2 Add tests for ModuleBuilder.ResolveMember on different kind of tokens 2010-10-08 14:22:04 +02:00
Jb Evain f0e9b848d8 Add tests for ModuleBuilder.ResolveMemberToken 2010-10-07 20:03:12 +02:00
Jb Evain 84ce102017 Fix test 2010-10-07 16:43:41 +02:00
Jb Evain 88a0e6946a [Test] Add test for ModuleBuilder.ResolveFieldToken on generic fields. 2010-10-07 16:40:40 +02:00
Rodrigo Kumpera e340fb6e79 Fix AssemblyBuilder::GetTypes () with unfinished types.
* AssemblyBuilder.cs (GetTypes): Raise ReflectionTypeLoadException
	if any type was not finished.

	* AssemblyBuilderTest.cs: Add test for GetTypes () and incomplete
	TypeBuilders'.

	Fixes #640288
2010-09-20 14:32:24 -03:00
Rodrigo Kumpera a0182452a3 MethodBuilder should return null for generic arguments of non generic method.
* MethodBuilder.cs (GetGenericArguments): Return null if not
	generic.

	* MethodBuilderTest.cs: Add test for #384127.

	Fixes bug #384127.
2010-09-13 14:26:30 -03:00
Zoltan Varga 82f1cb6937 Fix the corlib tests build. 2010-08-18 04:36:28 +02:00
Jb Evain 8c411d7bf3 Add test for dynamic methods with invalid unicode name 2010-08-17 19:18:00 +02:00
Jb Evain 93e0e07963 Test that we can call GetMethodBody on a method defined in a dynamic module. 2010-08-06 13:07:17 +02:00
Rodrigo Kumpera 11a85794e3 Add test for using generic arguments from other methods.
* MethodBuilderTest.cs: Add test for generic arguments
	used are parameter of a method builder.
2010-08-04 18:40:24 -03:00
Rodrigo Kumpera 124975872a Add regression test for #626441.
2010-07-29 Rodrigo Kumpera  <[email protected]>

	* MethodBuilderTest.cs: Add test for #626441.
2010-07-29 16:07:05 -03:00
Miguel de Icaza 1c1baca891 2010-07-15 Miguel de Icaza <[email protected]>
* FieldBuilderTest.cs: Add new test that exercises encoding
	datetime constants with SetConstant.

svn path=/trunk/mcs/; revision=160401
2010-07-15 04:51:01 +00:00
Rodrigo Kumpera 9e229128b2 2010-06-21 Rodrigo Kumpera <[email protected]>
* GenericTypeParameterBuilderTest.cs: Fix test
	under v4.

svn path=/trunk/mcs/; revision=159264
2010-06-21 13:17:32 +00:00
Zoltan Varga 245d910458 2010-06-15 Zoltan Varga <[email protected]>
* ModuleBuilderTest.cs: Disable the TestGlobalMethods () test since it's been failing
	for a long time.

svn path=/trunk/mcs/; revision=158939
2010-06-15 11:37:29 +00:00
Jb Evain 11ef995628 2010-05-27 Jb Evain <[email protected]>
* EnumBuilderTest.cs: add test for .net_4_0's GetEnumUnderlyingType.


svn path=/trunk/mcs/; revision=158020
2010-05-27 11:39:31 +00:00