177 Commits
Author SHA1 Message Date
Carlos Alberto Cortez ea47a54561 Add new AttributeCollectionTest file.
* AttributeCollectionTest.cs: New test file.
2010-09-05 05:53:23 +02:00
Zoltan Varga 732fad3b05 Remove some hash code tests which can fail. 2010-08-09 18:22:55 +02:00
Raja R Harinath b293948fb7 EOL handling
This set of .gitattributes was automatically generated from the list of files
that GIT tried to normalize when I enabled automatic EOL conversion.

With this set of attributes, we prevent automated EOL conversion on files that
we know will cause trouble down the road.
2010-07-25 20:17:39 +05:30
Marek Habersack 629cd06c70 2010-07-19 Marek Habersack <[email protected]>
* MultilineStringConverter.cs: implemented

svn path=/trunk/mcs/; revision=160566
2010-07-19 13:05:03 +00:00
Sebastien Pouliot 13b20e1330 2010-05-21 Sebastien Pouliot <[email protected]>
* DefaultValueAttributeTest.cs: Change test case to compare the 
	hash code of two DVA created with null (instead of comparing to 0)


svn path=/trunk/mcs/; revision=157697
2010-05-21 13:02:23 +00:00
Carlos Alberto Cortez cf374ed99a 2010-02-05 Carlos Alberto Cortez <[email protected]>
* MaskedTextProviderTest.cs: New tests for ToString and
	ToDisplayString, specifically when IsPassword is true. 


svn path=/trunk/mcs/; revision=150927
2010-02-05 13:44:00 +00:00
Atsushi Eno 41edb8afe0 2010-01-25 Atsushi Enomoto <[email protected]>
some number ConvertTo() compatibility fixes (that are reported as
!CanConvertTo()), patch by Alexandre Gomes.

svn path=/trunk/mcs/; revision=150100
2010-01-25 03:38:42 +00:00
Alan McGovern 7d1d8cfeec 2009-09-29 Alan McGovern <[email protected]>
* CategoryAttributeTest.cs: Added new test file.
	  

svn path=/trunk/mcs/; revision=142874
2009-09-29 14:55:33 +00:00
Ivan Zlatev eac09e707f 2009-09-24 Ivan Zlatev <[email protected]>
* EnumConverter.cs: Fix conversion of 0 flag values.
	* EnumConverterTests.cs: Add a test to verify behaviour when converting
	 a 0 flag value.
	[Fixes bug #541402]

svn path=/trunk/mcs/; revision=142534
2009-09-23 23:56:06 +00:00
Gert Driesen 3b2ca87f4f * Container.cs: Replaced for loop with for loop.
[Fixes bug #522474]
* ContainerTest.cs: Added test for bug #522474.

svn path=/trunk/mcs/; revision=138328
2009-07-21 19:12:18 +00:00
Gert Driesen c58d431a74 * Container.cs: Avoid NRE in Remove and RemoveWithoutUnsiting.
* ContainerTest.cs: Added tests for Remove and RemoveWithoutUnsiting.

svn path=/trunk/mcs/; revision=138175
2009-07-18 09:56:51 +00:00
Gert Driesen 506ae3239b * ContainerTest.cs: Added tests for Add, Dispose, ValidateName and
GetService.
* Container.cs: Changed Dispose(bool) behaviour to match .NET, based
on patch by Tom Hindle ([email protected]). Also use ValidateName
in Add overloads on 1.0 profile by making it available as private
method. Use case-insensitive comparison of component name.

svn path=/trunk/mcs/; revision=138174
2009-07-18 08:20:49 +00:00
Robert Jordan 6fc23e40bc 2009-06-26 Robert Jordan <[email protected]>
* EventHandlerListTests.cs, LicenseManagerTests.cs:
	Upgrade to new NUnit style. Standalone tests (#if !NUNIT)
	removed.


svn path=/trunk/mcs/; revision=136952
2009-06-26 12:43:22 +00:00
Marek Habersack 1821e106c7 2009-06-22 Marek Habersack <[email protected]>
* WeakObjectWrapper.cs, WeakObjectWrapperComparer.cs: added - used
	by TypeDescriptor for storage of type description providers.

	* TypeDescriptor.cs: implemented part of the 2.0+ API which deals
	with adding/removing/getting type description providers.

	* AttributeCollection.cs: do not throw NREX when attrList is
	null in Count.

2009-06-22  Marek Habersack  <[email protected]>

	* TypeDescriptorTests.cs: added tests for 2.0+ APIs which deal
	with adding/removing/getting type description providers.

svn path=/trunk/mcs/; revision=136634
2009-06-22 18:24:19 +00:00
Jonathan Pryor e6b5bca321 * ListChangedEventArgsTest.cs: Fix .NET 1.1 compile error.
svn path=/trunk/mcs/; revision=134175
2009-05-15 01:18:56 +00:00
Jonathan Pryor 2d87668646 * System_test.dll.sources: Add ListChangedEventArgsTest.cs.
* System.ComponentModel/ListChangedEventArgs.cs: Fix .NET compatibility
	  problems (discovered from trying to run the System.Data.Linq 
	  unit tests).
	* Test/System.ComponentModel/ListChangedEventArgsTest.cs: Added; tests
	  for ListChangedEventArgs.

svn path=/trunk/mcs/; revision=134138
2009-05-14 15:08:47 +00:00
Marek Habersack f876f962ec 2009-02-19 Marek Habersack <[email protected]>
* AttributeCollection.cs: this [Type] shouldn't throw a NREX when
	attrList is null.

	* TypeDescriptor.cs: GetConverter (Type) must throw
	ArgumentNullException if the passed parameter is null.
	FindDefaultConverterType should gracefully cope with type being
	null.

2009-02-19  Marek Habersack  <[email protected]>

	* TypeDescriptorTests.cs: added a test for
	TypeDescriptor.GetConverter (null) case.

svn path=/trunk/mcs/; revision=127343
2009-02-18 23:08:26 +00:00
Ivan Zlatev 3993c9ddeb 2008-12-22 Ivan N. Zlatev <[email protected]>
* ReferenceConverter.cs: Implemented.
	* ReferenceConverterTest.cs: Added.
	[Fixes bug #381435]

svn path=/trunk/mcs/; revision=121997
2008-12-22 19:17:58 +00:00
Ivan Zlatev e074114716 2008-12-06 Ivan N. Zlatev <[email protected]>
* TypeDescriptor.cs: Added support for NullableConverter.
	* TypeDescriptorTests.cs: Added a test for the NullableConverter support.

svn path=/trunk/mcs/; revision=120946
2008-12-06 16:35:57 +00:00
Ivan Zlatev bd41dbef49 2008-12-06 Ivan N. Zlatev <[email protected]>
* NullableConverter.cs: Implemented.
	* NullableConverterTest.cs: Added.
	* System_test.dll.sources: Addded NullableConverterTest.cs

svn path=/trunk/mcs/; revision=120945
2008-12-06 16:35:51 +00:00
Gert Driesen 0ef99c99a7 * TypeDescriptorTests.cs:
* PropertyDescriptorTests.cs: Define alias for S.C.DescriptionAttribute
to avoid ambiguous reference error using more recent versions of
NUnit (which also contains a DescriptionAttribute).

svn path=/trunk/mcs/; revision=116351
2008-10-18 08:03:37 +00:00
Rodrigo Kumpera 892f1f1e2f In Test/System.ComponentModel:
2008-09-01  Rodrigo Kumpera  <[email protected]>

	* PropertyDescriptorTest.cs: Tests for Get/Set Value of partial
	overrides of virtual properties.

In System.ComponentModel:
2008-09-01  Rodrigo Kumpera  <[email protected]>

	* ReflectionPropertyDescriptor.cs (SetValue, GetValue) : Lookup
	the MethodInfo for accessors in parent types in case of partial
	overrides of virtual properties.


svn path=/trunk/mcs/; revision=112052
2008-09-01 23:52:37 +00:00
Sebastien Pouliot 578f5b6f90 2008-08-07 Sebastien Pouliot <[email protected]>
* DefaultValueAttributeTest.cs: New. A few unit tests for 
	DefaultValueAttribute - showing problems in Equals and GetHashCode.


svn path=/trunk/mcs/; revision=109854
2008-08-07 13:36:58 +00:00
Ivan Zlatev 66c54b0696 2008-07-16 Ivan N. Zlatev <[email protected]>
* TypeDescriptor.cs:
	 - Fix GetConverter (Type) overload to have same logic as the
	 object one.
	 - Object-ReferenceConverter should be the last entry in the predefined
	 converters table, so that when we look up we don't end up with the wrong
	 converter for derived types.
	* TypeDescriptorTests.cs: Add a test that both GetConverter
	overloads return the same converter.

svn path=/trunk/mcs/; revision=108087
2008-07-16 21:09:41 +00:00
Jonathan Pobst c2c1e06c8c 2008-07-16 Jonathan Pobst <[email protected]>
Apply patch from Achille Fouilleul (achille.fouilleul at gadz dot org)

	* BackgroundWorker.cs: Ensure the async object is set to null before
	calling RunWorkerCompleted, as IsBusy is based off the async object.
	[Fixes bug #394365]

2008-07-16  Jonathan Pobst  <[email protected]>

	* BackgroundWorkerTest.cs: Add some asserts for bug #364365.

svn path=/trunk/mcs/; revision=108053
2008-07-16 16:24:58 +00:00
Jonathan Pobst 7f29c4c77e 2008-07-16 Jonathan Pobst <[email protected]>
Apply patches from Jordan Callicoat (MonkeeSage at gmail dot com)

	* AsyncCompleteEventArgs.cs: RaiseExceptionIfNecessary should throw
	TargetInvocationException if there was an exception, and IOE if
	the operation was cancelled.
	* BackgroundWorker.cs: Do not call RunWorkerCompleted from CancelAsync,
	setting cancel_pending to true is enough.
	* RunWorkerCompletedEventArgs.cs: Raise exceptions when user tries
	to access the Result if there are any exceptions.
	[Fixes bugs #328830 and 373153]

2008-07-16  Jonathan Pobst  <[email protected]>

	* BackgroundWorkerTest.cs: Add tests for bugs 328830 and 373153.

svn path=/trunk/mcs/; revision=108039
2008-07-16 15:00:10 +00:00
Gert Driesen 92c3a34c32 * PropertyDescriptorCollectionTests.cs: Allow tests for pass on MS.
* TypeDescriptorTests.cs: Added GetProperties and GetEvents asserts
for interfaces.

svn path=/trunk/mcs/; revision=107139
2008-07-03 09:31:06 +00:00
Atsushi Eno 293fb62d31 too silly to document.
svn path=/trunk/mcs/; revision=106777
2008-06-27 20:56:26 +00:00
Gert Driesen f1f33477a9 * EventDescriptorCollectionTests.cs: Enabled tests for Empty, Find and
IList. Added test for String indexer.
* PropertyDescriptorCollectionTests.cs: Improved test for Find and
merged CultureInsensitiveFindTest. Improved test for Find with null 
name/key. Added test for String indexer.
* EventDescriptorCollection.cs: Fixed Empty to return read-only
collection. In a read-only collection, throw NotSupportedException
instead of InvalidOperationException when attempting to modify the
collection. Fixed find to use ordinal comparison on 2.0 profile.
Fixed IList's IsFixedSize and IsReadOnly.
* PropertyDescriptorCollection.cs (Find): Use key as argument name
when name is null. Silly compatiblity fix.

svn path=/trunk/mcs/; revision=106736
2008-06-27 13:26:19 +00:00
Gert Driesen daaaa7b89c * System_test.dll.sources: Added EventDescriptorCollectionTest.cs.
* EventDescriptorCollectionTests.cs: Added tests based on tests for
PropertyDescriptorCollection.
* PropertyDescriptorCollectionTests.cs: Added tests for Sort overloads.
Improved test for Find with null key.
* EventDescriptorCollection.cs: Fixed NRE in Sort overloads when order
string array is null.
* PropertyDescriptorCollection.cs: Fixed NRE in Sort overloads when
order string array is null.

svn path=/trunk/mcs/; revision=106733
2008-06-27 11:59:22 +00:00
Atsushi Eno 90ccb040e6 2008-06-11 Atsushi Enomoto <[email protected]>
* DateTimeConverter.cs : use MM for month instead of mm.
	  Fixed bug #396649, patch by Andy Hume.

	* DateTimeConverterTest.cs : test for bug #396649 by Andy Hume.


svn path=/trunk/mcs/; revision=105573
2008-06-11 12:20:57 +00:00
Ivan Zlatev b861d06e17 2008-05-30 Ivan N. Zlatev <[email protected]>
* TypeDescriptorTests.cs: Fix the attributes test on the 1.1 profile.


svn path=/trunk/mcs/; revision=104486
2008-05-30 01:21:50 +00:00
Ivan Zlatev 4aeb7473ea 2008-05-29 Ivan N. Zlatev <[email protected]>
* TypeDescriptor.cs: GetAttributes must retrieve the attributes of 
	the type, the base types and the interfaces the type implements.
	[Fix part of bug #394310]
	* TypeDescriptorTests.cs: Add test that verifies that GetAttributes 
	retrieves the attributes of the type, the base types and the 
	interfaces the type implements.


svn path=/trunk/mcs/; revision=104438
2008-05-29 16:40:27 +00:00
Ivan Zlatev 02473d74c9 2008-05-05 Ivan N. Zlatev <[email protected]>
* TypeDescriptor.cs: GetProperties should not return write-only 
	properties. Patch by James Fitzsimons  <[email protected]>.
 	* TypeDescriptorTests.cs: Add test for handling write-only properties.


svn path=/trunk/mcs/; revision=102535
2008-05-05 15:48:48 +00:00
Gert Driesen 7bf14cac1d * VBCodeGenerator.cs: Fixed generated code for abstract properties.
* CodeGeneratorFromTypeTest.cs: Added tests for static and abstract
property.
* ComponentConverterTests.cs: Allow test to be compiled using csc 1.x.
* ExecutorTest.cs: Use Assert.Ignore when ping is not available.
Avoid using ExpectedException in ExecWait test, and added link to
MS bug report.

svn path=/trunk/mcs/; revision=102229
2008-04-30 18:41:21 +00:00
Marek Habersack 7fff97b791 2008-04-16 Marek Habersack <[email protected]>
* ReferenceConverter.cs: fix ConvertFrom and ConvertTo when
	converting from/to string - base must be called only if the
	conversion target type is NOT string, otherwise the result of the
	conversion will be the value type name.
2008-04-16  Marek Habersack  <[email protected]>

	* ComponentConverterTests.cs: added tests for
	{Component, Reference}Converter ConvertFrom/ConvertTo changes.
2008-04-16  Marek Habersack  <[email protected]>

	* System_test.dll.sources: added
	System.ComponentModel/ComponentConverterTests.cs

	* Makefile (TEST_MCS_FLAGS): reference -r:System.Data for new
	tests.

svn path=/trunk/mcs/; revision=100952
2008-04-16 21:52:54 +00:00
Ivan Zlatev 389a0cfbb0 2008-03-28 Ivan N. Zlatev <[email protected]>
* TypeDescriptor.cs: Do not return parent type properties, where the child
        has used "new" and also changed the property return type. The problem was that
        Type.GetProperties returns both the child and parent property in this case.
        * TypeDescriptorTests.cs: Add an unit test.
        [Fixes bug #374334]


svn path=/trunk/mcs/; revision=99235
2008-03-28 19:29:09 +00:00
Gert Driesen 186fc79213 * DesignerAttribute.cs: To match MS, throw NRE when designerTypeName argument
is null in ctors. 
 * System_test.dll.sources: Added DesignerAttributeTest.cs.
* DesignerAttributeTest.cs: Added ctor tests.

svn path=/trunk/mcs/; revision=98385
2008-03-15 07:34:51 +00:00
Ivan Zlatev 18e9712b24 2008-02-26 Ivan N. Zlatev <[email protected]>
* PropertyDescriptor.cs: 
         - Implement CreateInstance and GetTypeFromName
         and refactor GetEditor and Converter use them.
         - Drop TypeDescriptor.GetTypeFromName as we also want to check the
         ComponentType assembly, which it doesn't do.
        * TypeDescriptor.cs: Make GetTypeFromName private as it is no longer
        used from the outside.
        * PropertyDescriptorTests.cs: Add Converter tests. Based on a 
        patch by Andy Hume <[email protected]> under the MIT/X11 
        license.
        * System_test.dll.sources: Add Consts.cs so that tests can use it
        (e.g for specifying assembly qualified type names in attributes).


svn path=/trunk/mcs/; revision=96687
2008-02-26 20:39:05 +00:00
Gert Driesen 15d9f261e9 * CharConverter.cs: Use trimmed value in FormatException.
* CharConverterTest.cs: Fixed test to pass on MS.
* PropertyDescriptorTest.cs: Added test for Attributes.

svn path=/trunk/mcs/; revision=96683
2008-02-26 19:27:46 +00:00
Gert Driesen 21d318379c * CharConverterTest.cs: Added tests for ConvertFrom and ConvertTo.
* CultureInfoConverterTest.cs: Added tests for ConvertFrom and
ConvertTo.
* CharConverter.cs (ConvertFrom): Avoid NRE when value is null.
Provide more info when left of value > 1.
* CultureInfoConverter.cs (ConvertFrom): Avoid NRE when value is null.
On 2.0 profile, use case-sensitive comparison for (Default) value.
Use case-insensitive comparing when value is considered as displayname.
Provide more info in exception message.
(ConvertTo): Use '(Default)' instead of '(default)' for invariant
culture.
* System_test.dll.sources: Added CharConverterTest.cs and
CultureInfoConverterTest.cs.

svn path=/trunk/mcs/; revision=95995
2008-02-17 19:08:47 +00:00
Ivan Zlatev a00d95a1a7 2008-02-04 Ivan N. Zlatev <[email protected]>
* DateTimeConverter.cs: handle empty strings in ConvertFrom.
	 * DateTimeConverterTests.cs: Test ConvertFrom with empty string.


svn path=/trunk/mcs/; revision=94810
2008-02-04 23:03:36 +00:00
Rolf Bjarne Kvinge 35211604e6 * System.ComponentModel/MaskedTextProvider.cs,
Test/System.ComponentModel/MaskedTextProviderTest.cs: Fix
  IsPassword (found by Gendarme)

svn path=/trunk/mcs/; revision=93313
2008-01-19 11:26:12 +00:00
Roei Erez e3fd2f0f51 Remove TARGET_JVM directive
svn path=/trunk/mcs/; revision=93140
2008-01-17 10:38:22 +00:00
Gert Driesen 9e100ebe8f * Component.cs: Moved Site property before Container to match MS. This
allows a unit test for ordered result of TypeDescriptor.GetProperties
to pass.
* TypeDescriptorProperties.cs: added test for order of 
PropertyDescriptor instances returned by GetProperties.

svn path=/trunk/mcs/; revision=92200
2008-01-03 18:53:19 +00:00
Vladimir Krasnov 697eb249dc * PropertyDescriptorCollection.cs: optimized Find method, removed culture sensitive string comparison
* PropertyDescriptorCollectionTests.cs: added test for Find method

svn path=/trunk/mcs/; revision=91873
2007-12-25 10:17:47 +00:00
Gert Driesen d904080ad7 * System_test.dll.sources: Added Win32ExceptionTest.cs.
* Win32Exception.cs: Do not pass native error to base ctors.
* Win32ExceptionTest.cs: Added ctor tests.

svn path=/trunk/mcs/; revision=90633
2007-12-04 10:43:32 +00:00
Arina Itkes 0e6dd46fa2 TARGET_JVM: Mark ConvertFrom_String, ConvertFrom_String_Flags NotWorking
svn path=/trunk/mcs/; revision=90153
2007-11-22 13:14:15 +00:00
Gert Driesen 9150d90702 * MemberDescriptor.cs: Spaces to tabs, code formatting.
* PropertyDescriptor.cs: When adding or removing a new handler for an 
existing component, update the hashtable. In GetValueChangedHandler,
return null if component is null.
* PropertyDescriptorTests.cs: Added tests for AddValueChanged,
GetInvocationTarget, GetValueChangedHandler and RemoveValueChanged.

svn path=/trunk/mcs/; revision=89659
2007-11-15 09:25:50 +00:00
Gert Driesen 93905517cd * InvalidEnumArgumentExceptionTest.cs: Added ctor tests.
* InvalidEnumArgumentException.cs: Fixed default ctor. Modified
message on 2.0 profile for ctor (string, int, Type) to match MS.
* System_test.dll.sources: Added InvalidEnumArgumentExceptionTest.cs.

svn path=/trunk/mcs/; revision=88787
2007-11-03 14:13:27 +00:00