diff options
author | Martin Baulig <martin@novell.com> | 2005-07-28 00:34:17 +0400 |
---|---|---|
committer | Martin Baulig <martin@novell.com> | 2005-07-28 00:34:17 +0400 |
commit | 4290b4795eba821899c2e6f5224f5a3bf628d08b (patch) | |
tree | 348efa680c1443130350da882632133a8a5c81f7 /mcs/tests/test-iter-11.cs | |
parent | f6e016be9c1c5c825f8283b7503f6125c03716e5 (diff) |
New test for #75649.
svn path=/trunk/mcs/; revision=47770
Diffstat (limited to 'mcs/tests/test-iter-11.cs')
-rw-r--r-- | mcs/tests/test-iter-11.cs | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/mcs/tests/test-iter-11.cs b/mcs/tests/test-iter-11.cs new file mode 100644 index 00000000000..3dcce679f4a --- /dev/null +++ b/mcs/tests/test-iter-11.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections; + +class X { + public event EventHandler Hook; + + public IEnumerator Pipeline () + { + if (Hook == null) + throw new Exception ("error"); + + Hook (this, EventArgs.Empty); + + yield return 0; + } + + static void M (object sender, EventArgs args) + { + Console.WriteLine ("Hook invoked"); + } + + static void Main () + { + X x = new X (); + x.Hook += M; + IEnumerator y = x.Pipeline (); + y.MoveNext (); + } +} + |