New test.
authorMartin Baulig <martin@novell.com>
Wed, 4 Oct 2006 20:51:21 +0000 (20:51 -0000)
committerMartin Baulig <martin@novell.com>
Wed, 4 Oct 2006 20:51:21 +0000 (20:51 -0000)
svn path=/trunk/mcs/; revision=66268

1  2 
mcs/tests/gtest-anon-28.cs

index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..258dd873ff0909ac3e73a012cf91a7542cdf98ce
new file mode 100755 (executable)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,41 @@@
++using System;
++using System.Collections.Generic;
++
++public delegate void Hello ();
++
++struct Foo
++{
++      public int ID;
++
++      public Foo (int id)
++      {
++              this.ID = id;
++      }
++
++      public IEnumerable<Foo> Test (Foo foo)
++      {
++              yield return this;
++              yield return foo;
++      }
++
++      public void Hello (int value)
++      {
++              if (ID != value)
++                      throw new InvalidOperationException ();
++      }
++
++      public override string ToString ()
++      {
++              return String.Format ("Foo ({0})", ID);
++      }
++}
++
++class X
++{
++      static void Main ()
++      {
++              Foo foo = new Foo (3);
++              foreach (Foo bar in foo.Test (new Foo (8)))
++                      Console.WriteLine (bar);
++      }
++}