Files
mono/mcs/tests
Martin Baulig d43d9cd06c 2004-08-04 Martin Baulig <[email protected]>
* Makefile (test-generic-3): New target to run all the generic
	tests.

svn path=/trunk/mcs/; revision=31836
2004-08-03 22:32:41 +00:00
..
2004-05-31 01:13:30 +00:00
2003-09-30 17:47:44 +00:00
2003-09-30 17:47:44 +00:00
2003-09-30 17:47:44 +00:00
2003-09-30 17:47:44 +00:00
2004-01-16 23:06:04 +00:00
2004-02-13 04:44:51 +00:00
2004-04-14 23:18:43 +00:00
2004-08-01 12:34:47 +00:00
2004-04-02 05:13:05 +00:00
2004-04-02 05:13:05 +00:00
2004-04-02 05:13:05 +00:00
2004-04-02 05:13:05 +00:00
2004-04-02 05:13:05 +00:00
2004-04-02 05:13:05 +00:00
2004-04-02 05:13:05 +00:00
2004-04-02 05:13:05 +00:00
2004-04-02 05:13:05 +00:00
2004-04-05 04:07:58 +00:00
2001-08-19 22:59:25 +00:00
2001-08-19 22:59:25 +00:00
2003-09-16 21:21:04 +00:00
2004-01-07 16:36:17 +00:00
2004-01-07 16:36:17 +00:00
2004-01-07 16:36:17 +00:00
2004-01-07 16:36:17 +00:00
2004-01-07 16:36:17 +00:00
2004-01-07 16:36:17 +00:00
2004-01-07 16:36:17 +00:00
2004-01-07 16:36:17 +00:00
2004-01-07 16:36:17 +00:00
2001-08-19 22:59:25 +00:00
2001-08-19 22:59:25 +00:00
2001-10-02 13:00:47 +00:00
2003-06-29 05:40:13 +00:00
2003-04-22 22:08:32 +00:00
2003-04-22 22:08:32 +00:00
2004-03-30 01:37:38 +00:00
2004-03-30 01:37:38 +00:00
2004-03-30 01:37:38 +00:00
2003-10-08 20:11:16 +00:00
2004-03-30 01:37:38 +00:00
2004-03-30 01:37:38 +00:00
2003-10-17 03:41:09 +00:00
2003-10-17 03:41:09 +00:00
2003-10-17 03:41:09 +00:00
2004-03-30 01:37:38 +00:00
2003-10-17 16:29:47 +00:00
2004-03-30 01:37:38 +00:00
2004-03-30 01:37:38 +00:00
2004-03-30 01:37:38 +00:00
2004-03-30 01:37:38 +00:00
2004-03-30 01:37:38 +00:00
2004-03-30 01:37:38 +00:00
2004-03-30 01:37:38 +00:00
2004-03-30 01:37:38 +00:00
2004-03-30 01:37:38 +00:00
2004-03-30 01:37:38 +00:00
2004-03-30 01:37:38 +00:00
2004-03-30 01:37:38 +00:00
2004-03-30 01:37:38 +00:00
2004-03-31 01:06:27 +00:00
2004-03-30 01:37:38 +00:00
2004-03-30 01:37:38 +00:00
2004-03-30 01:37:38 +00:00
2004-03-30 01:37:38 +00:00
2004-03-18 00:44:03 +00:00
2004-03-30 01:37:38 +00:00
2004-03-30 01:37:38 +00:00
2004-03-30 01:37:38 +00:00
2004-03-30 01:37:38 +00:00
2004-03-30 01:37:38 +00:00
2004-03-30 01:37:38 +00:00
2004-03-29 17:12:09 +00:00
2004-03-30 01:37:38 +00:00
2004-03-30 01:37:38 +00:00
2004-03-30 01:37:38 +00:00
2004-03-30 01:37:38 +00:00
2004-03-31 02:11:35 +00:00
2004-04-02 02:19:24 +00:00
2004-04-02 04:32:48 +00:00
2004-04-02 23:25:15 +00:00
2004-07-13 14:42:11 +00:00
2004-07-13 15:19:48 +00:00
2004-07-17 22:55:37 +00:00
2001-12-04 00:54:29 +00:00
2001-12-04 00:54:29 +00:00
2001-08-19 22:59:25 +00:00
2001-08-19 22:59:25 +00:00
2001-08-19 22:59:25 +00:00
2001-08-19 22:59:25 +00:00
2001-08-19 22:59:25 +00:00
2001-08-19 22:59:25 +00:00
2001-08-04 01:15:00 +00:00
2001-08-19 22:59:25 +00:00
2001-08-04 01:15:00 +00:00
2001-06-08 18:45:34 +00:00
2001-08-19 22:59:25 +00:00
2001-08-19 22:59:25 +00:00
2001-08-19 22:59:25 +00:00
2004-05-31 15:13:25 +00:00
2004-05-31 15:13:25 +00:00
2003-07-22 18:54:29 +00:00
2003-06-29 05:40:13 +00:00
2003-07-22 18:54:29 +00:00
2001-08-19 22:59:25 +00:00
2001-09-19 23:14:09 +00:00
2001-09-19 23:14:09 +00:00
2001-09-20 01:31:54 +00:00
2001-09-20 01:31:54 +00:00
2001-09-20 01:31:54 +00:00
2003-03-28 23:21:55 +00:00
2001-12-07 04:56:12 +00:00
2001-09-27 23:54:27 +00:00
2002-01-08 01:43:56 +00:00
2003-05-11 22:45:42 +00:00
2002-05-06 15:12:43 +00:00
2001-10-04 21:21:13 +00:00
2002-04-04 07:09:49 +00:00
2003-04-11 01:29:33 +00:00
2001-12-13 23:32:13 +00:00
2001-12-14 21:05:53 +00:00
2001-10-28 15:07:08 +00:00
2001-11-01 06:35:40 +00:00
2002-11-22 23:03:53 +00:00
2002-01-01 19:06:23 +00:00
2003-05-05 21:46:44 +00:00
2003-08-22 02:09:32 +00:00
2002-10-19 22:06:29 +00:00
2001-12-08 22:48:43 +00:00
2003-08-06 07:00:55 +00:00
2001-11-22 19:11:20 +00:00
2003-10-15 03:34:54 +00:00
2004-03-11 23:47:54 +00:00
2001-12-13 23:32:13 +00:00
2001-12-13 23:32:13 +00:00
2004-05-09 18:23:29 +00:00
2004-04-02 02:19:24 +00:00
2001-12-20 21:29:11 +00:00
2001-12-23 15:29:57 +00:00
2001-12-21 01:27:30 +00:00
2001-12-22 22:45:37 +00:00
2001-12-24 00:59:36 +00:00
2002-01-01 19:06:23 +00:00
2003-02-14 21:35:27 +00:00
2001-12-30 14:56:46 +00:00
2002-01-03 02:00:10 +00:00
2002-01-08 01:43:56 +00:00
2002-01-08 01:43:56 +00:00
2002-02-12 22:40:32 +00:00
2002-02-25 16:06:01 +00:00
2002-12-06 23:34:39 +00:00
2002-05-06 15:12:43 +00:00
2002-03-13 17:36:11 +00:00
2002-09-19 21:48:10 +00:00
2002-03-17 12:47:41 +00:00
2002-03-19 00:23:14 +00:00
2004-01-07 05:41:57 +00:00
2002-03-27 22:24:41 +00:00
2002-04-03 20:58:19 +00:00
2004-01-07 15:11:15 +00:00
2002-04-12 13:58:39 +00:00
2002-12-10 23:47:42 +00:00
2004-01-02 23:18:04 +00:00
2002-04-18 07:26:43 +00:00
2002-05-01 17:35:57 +00:00
2002-05-07 11:20:33 +00:00
2002-05-06 15:12:43 +00:00
2002-05-13 16:53:57 +00:00
2002-05-13 16:53:57 +00:00
2002-05-17 10:58:08 +00:00
2002-05-26 00:47:45 +00:00
2003-05-06 19:03:08 +00:00
2004-03-13 23:10:55 +00:00
2002-06-20 20:56:34 +00:00
2002-06-22 06:14:13 +00:00
2002-06-22 19:35:29 +00:00
2002-06-22 23:13:55 +00:00
2002-07-01 14:56:16 +00:00
2002-07-09 19:15:26 +00:00
2002-07-03 21:46:25 +00:00
2003-05-26 19:00:21 +00:00
2003-07-04 23:45:40 +00:00
2003-11-26 18:41:43 +00:00
2002-11-01 21:19:25 +00:00
2002-08-07 18:32:33 +00:00
2003-05-19 00:59:11 +00:00
2002-10-19 06:45:36 +00:00
2002-10-22 23:59:33 +00:00
2002-10-25 01:20:00 +00:00
2002-11-12 10:38:51 +00:00
2002-11-17 16:34:42 +00:00
2004-04-29 17:03:43 +00:00
2002-12-15 08:49:32 +00:00
2003-01-28 06:53:54 +00:00
2003-02-13 00:34:47 +00:00
2003-02-14 21:35:27 +00:00
2003-02-26 02:13:30 +00:00
2003-04-11 03:04:28 +00:00
2003-04-26 04:07:17 +00:00
2003-06-24 04:14:27 +00:00
2004-01-10 17:40:43 +00:00
2003-09-30 19:40:27 +00:00
2003-10-08 00:15:32 +00:00
2003-10-15 03:57:56 +00:00
2003-11-25 05:23:39 +00:00
2003-11-27 22:37:12 +00:00
2004-01-02 23:18:04 +00:00
2004-01-17 19:47:22 +00:00
2004-01-04 22:28:14 +00:00
2004-01-22 01:25:36 +00:00
2004-02-13 04:44:51 +00:00
2004-02-28 00:43:30 +00:00
2004-03-20 19:49:57 +00:00
2004-03-24 11:49:58 +00:00
2004-04-16 11:11:29 +00:00
2004-04-21 07:48:42 +00:00
2004-04-27 18:44:16 +00:00
2004-04-29 20:17:58 +00:00
2004-05-05 11:01:22 +00:00
2004-05-09 18:00:13 +00:00
2004-05-20 18:46:35 +00:00
2004-05-26 00:48:28 +00:00
2004-05-28 12:20:06 +00:00
2004-05-30 21:32:23 +00:00
2004-06-07 12:35:11 +00:00
2004-06-09 15:54:10 +00:00
2004-06-17 20:50:27 +00:00
2004-06-18 07:53:04 +00:00
2004-06-24 06:04:41 +00:00
2004-07-10 19:32:47 +00:00
2004-07-22 14:27:15 +00:00
2003-01-08 21:40:55 +00:00
2004-02-07 05:35:42 +00:00
2002-06-12 23:44:34 +00:00
2003-01-27 02:12:14 +00:00
2003-04-09 20:33:05 +00:00
2004-03-29 21:40:49 +00:00
2004-06-23 23:33:35 +00:00
fix
2004-08-03 18:22:49 +00:00
2003-11-27 04:47:31 +00:00
2003-11-12 23:14:20 +00:00

Test cases listed by Category:
==============================

* Operators

  test-146.cs test-175.cs test-200.cs test-204.cs

* Overloading

  test-147.cs test-173.cs

* Try/Catch blocks

  verify-1.cs verify-2.cs

* Indexers and Properties

  test-148.cs test-166.cs test-206.cs test-208.cs test-209.cs
  test-221.cs test-236.cs

* Events and Delegates

  test-149.cs test-164.cs test-237.cs verify-3.cs

* Constant Folding

  test-150.cs

* Switch blocks

  test-152.cs test-193.cs test-234.cs verify-4.cs

* Member Access & Simple Names

  test-151.cs test-159.cs test-160.cs test-161.cs test-190.cs

* Invocation and Casts

  test-153.cs test-163.c test-207.cs test-210.cs test-211.cs test-223.cs

* Flow Analysis

  test-154.cs test-162.cs test-185.cs

* Type Containers

  test-155.cs test-156.cs

* Attributes

  test-157.cs test-158.cs test-177.cs test-230.cs test-238.cs test-239.cs test-240.cs

* Arrays and array creation

  test-165.cs, test-167.cs, test-232.cs

* Labels and goto

  verify-5.cs

* Enums

  verify-6.cs

* Type resolution and name lookup

  test-198.cs test-201.cs test-202.cs test-203.cs test-214.cs

Test cases listed by Number:
============================

test-91.cs
----------

Tests various permissions sets based on the visiblity flags.

test-146.cs
-----------
Test for Binary.EmitBrancheable() to ensure we're emitting correct
unsinged branch targets.

test-147.cs
-----------
Testing `new' modifier.

test-148.cs
-----------
Testing the `IndexerName' attribute in interface indexers.

test-149.cs
-----------
Testing interface events.

test-150.cs
-----------
Test for folding of UIntConstants.  See bug #28106.
FIXME:  We should all all possible test cases to this test.

test-151.cs
-----------

  A.Iface b;
  void doit (Object A) {
    b = (A.Iface)A;
 }

test-152.cs
-----------
Scope of variables declared inside a switch case.

test-153.cs
-----------
Testing invocation of varargs function.

test-154.cs
-----------
Flow analysis: This test contains all situations which are "allowed".

test-155.cs
-----------
Nested interfaces.

test-156.cs
-----------
Check whether base types are at least as accessible than the current type.

test-157.cs
-----------
Attributes.

test-158.cs
-----------
Attributes.

test-159.cs
-----------
SimpleNameLookup: Cast to `A.Iface' type when there's a parameter called `A'.

test-160.cs
-----------
ResolveMemberLookup: `B look; return look.s.a' must work in static context.

test-161.cs
-----------
ResolveMemberLookup: Field initializer references `DateTime.Now' when there's
an instance property/field `DateTime'.

test-162.cs
-----------
Control Flow Analysis wrt. structs.

test-163.cs
-----------
Test to check we select string over object when we have a Null literal as the argument.

test-164.cs
-----------
Virtual functions in delegate creation expressions.

test-165.cs
-----------
Enums in array creation expression.

test-166.cs
-----------
Using property from interface which is inherited multiple times.

test-173.cs
-----------
Check whether we select the correct function, don't report CS0121
for integer literals.

test-174.cs
-----------
Checks access to protected properties on base classes, and access to 
private properties on container classes.

test-175.cs
-----------
Check for user-defined implicit conversions if both arguments of a
binary operator are of a user-defined type.  Bug #30443.

test-176.cs
-----------
This tests checks that we perform constant folding on byte values.  The
compiler had a bug where it did not do so.

test-177.cs
-----------
This tests that the compiler is generating "return:" attributes for a 
method.  This was a separate code path, and was not handled in the past.


test-178.cs
-----------
Ensure that we emit attributes only once for operators. Bug #45876


test-179.cs
-----------
Tests various uses of the indexers in the presence of the `new' keyword
and various different argument types.

test-180.cs
-----------
This test is part of a bug report in which casting an enumeration value
into System.Enum was not wrapped correctly, and the wrong method was
called.

test-181.cs
-----------
Test whenever mcs correctly handles the MethodImplAttributes
custom attribute.

test-182.cs
-----------
Tests that bug 37473 is gone.  The problem was that we were generating
incorrect code for field references on a value type.  The code was originally
written by Martin, but I turned it off as I did not see what it did fix.  The
code is now turned on again.  

test-183.cs
-----------
This test just verifies that we generate the proper signature for
EndInvoke, something that we were not doing before in the presence
of out parameters

test-184.cs
-----------
This test fixes a bug that exposed a problem when calling a struct
constructor that is initialized from an instance constructor

test-185.cs
-----------
Flow analysis wrt. infinite loops.  Bug #37708.

test-186.cs
-----------
Typecasts were not being constant-folded/reduced, which triggered
the bug 37363.   (String) null was not a null constant in attributes.

test-187.cs
-----------
This test verifies that we resolve the source expression in a compound
expression before we attempt to use it.

test-188.cs
-----------
Test that the foreach statement generated by mcs invokes the Dispose()
method even if the enumerator class returned by GetEnumerator () does not
implement IDisposable.

test-189.cs
-----------
Test to ensure proper overload resolution of params method under various cases.

test-190.cs
-----------
Accessing private field of outer class from which we derive.

tests-191.cs
------------
Some accessibility tests that exist in Corlib and System, to probe the new
functionality in the compiler for accessibility of private nested classes.

test-192.cs
-----------
Fix for bug 41952, basically, we were not using the `unchecked' bit during
constant resolution due to the nature of EmitMeta.

test-193.cs
-----------
Fix for bug 39828, allow goto to a label in another switch section.

test-194.cs
-----------
Fix for bug #39108 - ensure that the correct form of a params method is called:

"explicit conversion of argument to object
(type object cannot be implicitly converted to type
object[]) affects resolution of normal/expanded form
of method invocation."

test-195.cs
-----------

Fix for bug #45149, constructors that call another constructor in the
same class (using ": this()") should not emit instance field initializers. 

test-196.cs:
------------

The optimization that we perform in uint & int-constant was triggering a bug
because we returned always, when we should have continued the processing if the
conditions were not correct.

test-197.cs
-----------

Fix for bug #42973.

test-198.cs
-----------

Type resolution and name lookup.  Fixes for bugs #36316, #36314.

test-199.cs
-----------

Name resolution wrt. inaccessible types.  Fixes bug #36313.

test-200.cs
-----------

Compound assignment (x = (y += 3)).  Fixes bug #45854.

test-201.cs
-----------

Fix for bug #35631.

test-202.cs
-----------

Fix for bug #41975.

test-203.cs
-----------

Fix for bug #33026.

test-204.cs
-----------

User defined conditional logical operators; bug #40505.

test-206.cs
-----------

Indexers; bug #46502.

test-207.cs
-----------

Expressions which return delegates.

test-208.cs
-----------

Indexers; bug #46788.

test-209.cs
-----------

Embedded assignments; while fixing a bug and making a mistake, I discovered some
problems during class libs compilation.  Let's just add a testcase for them here.

test-210.cs
-----------

Cast something to a delegate and then invoke it; bug #46923.

test-211.cs
-----------

Multiple casts.

test-212.cs
-----------

Params overload resolution with implicit user conversion

test-213.cs
-----------

Unboxing struct from interface type; bug #47822.

test-214.cs
-----------

Namespace lookups; bug #47853.

test-215.cs
-----------

Namespace lookups; bug #47927.

test-216.cs:
------------
Accessability bug fix #48710 on events

test-217.cs
-----------

>= and <= operators; bug #48679

test-218.cs
-----------
Tests delegate creation inside an array;  This exposed a bug in the
fact that New is called for DoResolve twice from array initialization.
Bug #48800

test-219.cs:
------------
Tests that we can call typeof(void) in an attribtue delcaration, since
we removed previously typeof (System.Void) as a valid way of referencing void.

test-220.cs:
------------
Test for a bug in foreach, where it would pick the wrong GetEnumerator in a class.
Bug # was 51446

test-221.cs:
------------
Test for correct scanning for base properties.

test-222.cs:
------------
Compilation test to check overload resolution. We should prefer int->uint over int->ulong.

test-223.cs:
------------
This tests that conversions from Enum and ValueType to structs
are treated as unboxing conversions, and the `unbox' opcode
is emitted. #52569.

test-224.cs:
------------
This tests the compilation of attributes with array parameters.

test-229.cs:
------------
Test enumerating on:
public class List : IEnumerable {

	public MyEnumerator GetEnumerator () {
		return new MyEnumerator(this);
	}
	
	IEnumerator IEnumerable.GetEnumerator () {
		...
	}
	
	public struct MyEnumerator : IEnumerator {
		...
	}
}

test-231.cs:
------------
Test for emitting callvirt when we need it.

test-232.cs:
------------
Tests for {...}-style array creation

test-233.cs:
------------
dup of basic-float.cs from mini, for bug 54303.

test-234.cs:
------------
Switch statement on a [Flags] style enum. bug 55885.

test-236.cs:
-----------
Test for bug #56300.  DefaultMemberAttribute should not be created if a
class has only private interface indexers.

test-237.cs:
-----------
Test for bug #56442.  Verify that delegate invocation and normal method
invocation act the same when the 'params' keyword is used.

verify-1.cs
-----------
Test whether we do not jump out of the method in a Try/Finally block.

verify-2.cs
-----------
Test whether `return' in a Try/Catch block actually returns.  Test
whether continue uses Leave when the branch is across Try/Catch
boundaries.

verify-3.cs
-----------
Checks default add/remove method of static events.

verify-4.cs
-----------
When there's an unreachable break in a switch section, it must not emit a jump out of
the method.

verify-6.cs
-----------
Casts from/to System.Enum.

unsafe-6.cs:
------------
Tests the correct computation of compound operators in the context of a pointer 
dereference on the left side.

gen-1.cs:
---------

Simple constructed type.

gen-2.cs:
---------

Type parameter as field.

gen-3.cs:
---------

Field of constructed type.

gen-4.cs:
---------

Method argument of constructed type.

gen-5.cs:
---------

Local variable of constructed type.

gen-6.cs:
---------

More complex example.

gen-7.cs:
---------

Constructed type deriving from a class type.

gen-8.cs:
---------

`where' clauses.

gen-9.cs:
---------

`where T : ICloneable' and then calling t.Clone ().

gen-10.cs:
----------

`where T : I, J' - I is an inferface, J a class.

gen-15.cs:
----------

Generic methods.

2test-1.cs
----------
C# 2.0 Iterators: Enumerator and Enumerable with foreach

2test-2.cs
----------
C# 2.0 Iterators: Obtaining the enumerator manually

2test-3.cs
----------
C# 2.0 Iterators: Multi-dimensional arrays as arguments to iterator method

2test-4.cs
----------
C# 2.0 Iterators: Use of a local variable in an enumerator.

2test-5.cs
----------
Method group conversions for C# 2.0

2test-6.cs
----------
Test iterators using foreach where you have to load the address of a struct