diff options
author | Marek Safar <marek.safar@gmail.com> | 2008-09-03 16:00:09 +0400 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2008-09-03 16:00:09 +0400 |
commit | 28b3861c5716ce16b593d6c370620a807be953ee (patch) | |
tree | 3d923359a26fb57ff25e25208c2394b393b2e742 /mcs/tests/gtest-iter-08.cs | |
parent | 43a00f5cfb6ec201e94dc54f6b3784aecfa37661 (diff) |
New test.
svn path=/trunk/mcs/; revision=112172
Diffstat (limited to 'mcs/tests/gtest-iter-08.cs')
-rwxr-xr-x | mcs/tests/gtest-iter-08.cs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/mcs/tests/gtest-iter-08.cs b/mcs/tests/gtest-iter-08.cs new file mode 100755 index 00000000000..8b93bfff599 --- /dev/null +++ b/mcs/tests/gtest-iter-08.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections; + +class App +{ + public static int Main () + { + foreach (object o in QueryEnumerable<string>()) { + if ((string)o != "Type: System.String") + return 1; + } + + return 0; + } + + public static IEnumerable QueryEnumerable<T> () + { + Console.WriteLine ("Type: " + typeof(T)); + yield break; + } +} |