Commit Graph
14 Commits
Author SHA1 Message Date
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