Author: martin
Date: 2008-02-18 09:47:39 -0500 (Mon, 18 Feb 2008)
New Revision: 96059
Modified:
branches/martin/debugger-terrania/debugger/test/src/TestIterator.cs
Log:
Make things generic here.
Modified: branches/martin/debugger-terrania/debugger/test/src/TestIterator.cs
===================================================================
--- branches/martin/debugger-terrania/debugger/test/src/TestIterator.cs
2008-02-18 14:44:15 UTC (rev 96058)
+++ branches/martin/debugger-terrania/debugger/test/src/TestIterator.cs
2008-02-18 14:47:39 UTC (rev 96059)
@@ -1,5 +1,4 @@
using System;
-using System.Collections;
using System.Collections.Generic;
public static class RunTests
@@ -20,7 +19,7 @@
{
int total;
- static IEnumerator GetRange ()
+ static IEnumerator<int> GetRange ()
{
yield return 1; // @MDB
LINE: test1 yield1
@@ -34,9 +33,9 @@
public int Run ()
{
- IEnumerator e = GetRange (); // @MDB
BREAKPOINT: test1 run
+ IEnumerator<int> e = GetRange (); // @MDB
BREAKPOINT: test1 run
while (e.MoveNext ()) // @MDB
LINE: test1 loop
- total += (int) e.Current; // @MDB
LINE: test1 statement
+ total += e.Current; // @MDB
LINE: test1 statement
return total; // @MDB
LINE: test1 return
}
@@ -50,7 +49,7 @@
int total;
bool stop;
- IEnumerator GetRange ()
+ IEnumerator<int> GetRange ()
{ // @MDB
LINE: test2 iterator start
while (total < 100) { // @MDB
LINE: test2 iterator loop
if (stop) // @MDB
LINE: test2 iterator if
@@ -62,7 +61,7 @@
public int Run ()
{
- IEnumerator e = GetRange (); // @MDB
BREAKPOINT: test2 run
+ IEnumerator<int> e = GetRange (); // @MDB
BREAKPOINT: test2 run
while (e.MoveNext ()) // @MDB
LINE: test2 loop
stop = true; // @MDB
LINE: test2 statement
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches