Skip to content

Commit

Permalink
2008-07-14 Marek Safar <marek.safar@gmail.com>
Browse files Browse the repository at this point in the history
	A test for bug #408361
	

svn path=/trunk/mcs/; revision=107889
  • Loading branch information
marek-safar committed Jul 14, 2008
1 parent be35604 commit feb7eb5
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 0 deletions.
27 changes: 27 additions & 0 deletions mcs/tests/gtest-iter-05.cs
@@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;

public class Test
{
public static void Main ()
{
Foo<int> nav = new Foo<int> ();
IEnumerable<int> t = TestRoutine<int> (new int [] { 1 }, nav);
new List<int> (t);
}

public static IEnumerable<T> TestRoutine<T> (IEnumerable<T> a, Foo<T> f)
{
f.CreateItem<int> ();
foreach (T n in a) {
yield return n;
}
}

}
public class Foo<T>
{
public void CreateItem<G> ()
{
}
}
47 changes: 47 additions & 0 deletions mcs/tests/ver-il-gmcs.xml
Expand Up @@ -14888,6 +14888,53 @@
</method>
</type>
</test>
<test name="gtest-iter-05.cs">
<type name="Test">
<method name="Void .ctor()">
<size>7</size>
</method>
<method name="IEnumerable`1 TestRoutine[T](IEnumerable`1, Foo`1[T])">
<size>30</size>
</method>
<method name="Void Main()">
<size>31</size>
</method>
</type>
<type name="Foo`1[T]">
<method name="Void .ctor()">
<size>7</size>
</method>
<method name="Void CreateItem[G]()">
<size>1</size>
</method>
</type>
<type name="Test+&lt;TestRoutine&gt;c__Iterator0`1[T]">
<method name="Void .ctor()">
<size>7</size>
</method>
<method name="T System.Collections.Generic.IEnumerator`1[T].get_Current()">
<size>7</size>
</method>
<method name="System.Object System.Collections.IEnumerator.get_Current()">
<size>12</size>
</method>
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()">
<size>65</size>
</method>
<method name="IEnumerator`1 System.Collections.Generic.IEnumerable`1[T].GetEnumerator()">
<size>65</size>
</method>
<method name="Boolean MoveNext()">
<size>185</size>
</method>
<method name="Void Dispose()">
<size>60</size>
</method>
<method name="Void Reset()">
<size>6</size>
</method>
</type>
</test>
<test name="gtest-linq-01.cs">
<type name="from.ITest">
<method name="Int32 get_Id()">
Expand Down

0 comments on commit feb7eb5

Please sign in to comment.