Commit Graph
25 Commits
Author SHA1 Message Date
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
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
Rodrigo Kumpera a44422d2b8 2010-04-01 Rodrigo Kumpera <[email protected]>
* ModuleBuilderTest.cs (TestGlobalMethods): Improve test.

svn path=/trunk/mcs/; revision=154662
2010-04-01 17:37:44 +00:00
Zoltan Varga b8f65530e3 2010-03-30 Zoltan Varga <[email protected]>
* ModuleBuilderTest.cs: Add a test for #592215.

svn path=/trunk/mcs/; revision=154487
2010-03-30 20:11:09 +00:00
Sebastien Pouliot 1bcf41ee8e In System.Reflection.Emit:
2009-10-29  Sebastien Pouliot  <[email protected]>

	* ModuleBuilder.cs: Add missing 'className' validations in GetType
	* TypeBuilder.cs: Add missing 'names' validations in 
	DefineGenericParameters

In Test/System.Reflection.Emit:
2009-10-29  Sebastien Pouliot  <[email protected]>

	* ModuleBuilderTest.cs: Add test cases for GetType overloads
	* TypeBuilderTest.cs: Remove NotWorking from two DefineGenericParameters test case.


svn path=/trunk/mcs/; revision=145013
2009-10-29 12:51:36 +00:00
Jb Evain a6546f45d2 2009-02-21 Jb Evain <[email protected]>
* ModuleBuilderTest.cs: add a test accessing the property
	Module.ModuleVersionId on a dynamic module.
	Test for #471302.


svn path=/trunk/mcs/; revision=127630
2009-02-21 16:16:33 +00:00
Rodrigo Kumpera 5bfe288623 In .:
2008-09-02 Rodrigo Kumpera  <[email protected]>

	* TypeBuilderTest.cs: New test for a field with initialized data
	that is referenced from another assembly.


svn path=/trunk/mcs/; revision=112126
2008-09-02 21:38:53 +00:00
Gert Driesen 6be6925690 * ModuleBuilderTest.cs: Added test for DefineType with interface as
parent.
* TypeBuilderTest.cs: Added test for SetParent with interface as
parent. Added test for CreateType of an interface with invalid parent.
Added tests for checks in DefineGenericParameters. Improved test
for MakeGenericType, and added tests for argument checks in
MakeGenericType.

svn path=/trunk/mcs/; revision=106355
2008-06-21 15:41:12 +00:00
Gert Driesen 68c67fcf27 * TypeBuilderTest.cs: Renamed tests and updated bug number. Enabled
test for UnderlyingSystemType, and improved it. Improved test for
null parent.
* ConstructorOnTypeBuilderInstTest.cs: Enabled test for GetParameters.
* ConstructorBuilderTest.cs: Enabled test for GetParameters. Renamed
test for SetCustomAttribute, and added new tests.
* ModuleBuilderTest.cs: Added tests for bug #387404.
* TypeBuilder.cs: Use Assembly.FullName instead of AssemblyName.
In UnderlyingSystemType, return UnderlyingSystemType of created type
when available. For an enum, UnderlyingSystemType is the type of the
first instance field. If no instance field is available, throw an
InvalidOperationException. Retain original behavior when operating in
compiler context.
* ConstructorBuilder.cs: Moved implementation of GetParameters to
GetParametersInternal to allow it to be used internally when type is
not yet created.
* CustomAttributeBuilder.cs: Added GetParameters method that uses
GetParametersInternal on ConstructorBuilder, and use it where
necessary.

svn path=/trunk/mcs/; revision=102970
2008-05-11 19:13:51 +00:00
Gert Driesen 3fcce25f53 * corlib_test.dll.sources: Added ConstructorOnTypeBuilderInstTest.cs.
* ParameterInfo.cs: Name must default to null if no ParameterBuilder
is supplied.
* ModuleBuilder.cs (DefineType): Do not perform lookup of in cache if
name is null to allow correct exception to be thrown (in TypeBuilder
ctor).
* TypeBuilder: Moved name argument check to TypeBuilder ctor. Modified
ArgumentException parameter names to match MS. Removed duplicate check
for data length from DefineInitializedData. Modified check_name to
only throw when first character is null char.
* ConstructorBuilder.cs (GetParameters): Throw NotSupportedException
(2.0) or InvalidOperationException (1.0) when type is not yet created
and we're not in compiler context. Return empty array when no
parameters are defined.
(MethodHandle): Always throw NotSupportedException.
(DefineParameter): Prevent NRE when parameters is null.
(GetCustomAttributes): When not in compiler context, always throw
NotSupportedException.
* ConstructorOnTypeBuilderInst.cs: Delegate to ConstructorBuilder
where possible. Fixed ContainsGenericParameters and IsGenericMethod
to always return false. In MethodBase.Invoke, throw an
InvalidOperationException instead of NIE.
* MethodOnTypeBuilderInstTest.cs: Fixed exception message in comments.
* TypeBuilderTest.cs: Do not use ExpectedException to avoid false
positives. Added argument check tests for DefineEvent, DefineField,
DefineMethod, DefinePInvokeMethod and DefinePropety. Use
Type.EmptyTypes instead of constructing empty array.
* ConstructorBuilderTest.cs: Added Test attributes. Added tests
for DefineParameter and Invoke overloads. Added tests for
GetCustomAttributes overloads. Avoid use of ExpectedException.
* ModuleBuilderTest.cs: Added tests for DefineType name argument
checks.
* ConstructorOnTypeBuilderInstTest.cs: Added basic set of tests.

svn path=/trunk/mcs/; revision=102211
2008-04-30 15:06:14 +00:00
Zoltan Varga e77d3517bd 2008-03-06 Zoltan Varga <[email protected]>
* ModuleBuilderTest.cs: Add a test for #367668.

svn path=/trunk/mcs/; revision=97520
2008-03-06 14:32:36 +00:00
Zoltan Varga 87bfb8ce03 2008-01-29 Zoltan Varga <[email protected]>
* ModuleBuilderTest.cs: Add tests for GetTypes ().

svn path=/trunk/mcs/; revision=94295
2008-01-29 19:16:19 +00:00
Zoltan Varga 4c230c9a44 2007-12-10 Zoltan Varga <[email protected]>
* ModuleBuilderTest.cs: Simplify some code. Add tests for ResolveField ()
	and FieldBuilders.

svn path=/trunk/mcs/; revision=91067
2007-12-10 21:26:16 +00:00
Gert Driesen bfc21a03d0 * TypeBuilder.cs: Throw InvalidOperationException when attempting to
construct non-abstract interface without base type. Modified SetParent  
to match MS: in 2.0 profile, throw InvalidOperationException when 
parent is null and TypeBuilder is non-abstract interface. When 
parent is null and TypeBuilder is not an interface, then set object
as parent. In 1.0 profile, throw ArgumentNullException when parent is
null.
* TypeBuilderTest.cs: Improved tests for SetParent.
* ModuleBuilderTest.cs: Added test for creating non-abstract
interface.

svn path=/trunk/mcs/; revision=81476
2007-07-06 14:38:44 +00:00
Gert Driesen 8ec726b766 * ModuleBuilderTest.cs: Avoid compiler warning in test for bug #80435.
Use Assert instead of deprecated Assertion class. Number tests.

svn path=/trunk/mcs/; revision=73903
2007-03-07 19:44:46 +00:00
Rolf Bjarne Kvinge e37d5c09cf In System.Reflection.Emit:
2007-03-06  Rolf Bjarne Kvinge  <[email protected]>

	* MonoArrayMethod.cs: Use 'void' as return type in ToString when 
	the return type is null. Fixes #80435.

In Test/System.Reflection.Emit:
2007-03-06  Rolf Bjarne Kvinge  <[email protected]>

	* ModuleBuilderTest.cs: Added GetArrayMethodToStringTest () -#80435.


svn path=/trunk/mcs/; revision=73788
2007-03-06 08:46:17 +00:00
Ben Maurer 2cac9d1d6b eol style
svn path=/trunk/mcs/; revision=46462
2005-06-23 23:11:11 +00:00
Nick Drochak c0ef78010c 2004-01-30 Nick Drochak <[email protected]>
* ModuleBuilderTest.cs: Avoid path length exceptions on Windows.

svn path=/trunk/mcs/; revision=39773
2005-01-30 01:32:52 +00:00
Zoltan Varga 150819ceea 2004-09-09 Zoltan Varga <[email protected]>
* ModuleBuilderTest.cs: Add test for lookup of global methods.

svn path=/trunk/mcs/; revision=33635
2004-09-09 10:20:31 +00:00
Nick Drochak 9d8d2a2db4 2003-12-17 Nick Drochak <[email protected]>
* ModuleBuilderTest.cs: Shorten the path, there's a 260-or-so character
	limit for the path name.

svn path=/trunk/mcs/; revision=21264
2003-12-17 07:43:00 +00:00
Zoltan Varga aececc6f87 2003-07-11 Zoltan Varga <[email protected]>
* ModuleBuilderTest.cs: Added tests for IsTransient ().

	* ModuleBuilderTest.cs: Added tests for DefineDocument ().

svn path=/trunk/mcs/; revision=16127
2003-07-11 19:04:20 +00:00
Zoltan Varga f443d83d90 2003-05-21 Zoltan Varga <[email protected]>
* ModuleBuilderTest.cs: New file.

svn path=/trunk/mcs/; revision=14758
2003-05-21 13:28:46 +00:00