diff --git a/.gitignore b/.gitignore index d71a3268..423f491a 100644 --- a/.gitignore +++ b/.gitignore @@ -162,3 +162,5 @@ pip-log.txt # Mac crap .DS_Store Rx.NET/Source/Rx.sln.ide/ +Ix.NET/Source/Interactive Extensions.sln.ide/ +Rx.NET/tools/HomoIcon/HomoIcon.sln.ide/ diff --git a/Ix.NET/Source/Tests/Tests.Creation.cs b/Ix.NET/Source/Tests/Tests.Creation.cs index 81fee033..b22fb265 100644 --- a/Ix.NET/Source/Tests/Tests.Creation.cs +++ b/Ix.NET/Source/Tests/Tests.Creation.cs @@ -40,6 +40,25 @@ namespace Tests Assert.IsTrue(hot); } + [TestMethod] + public void CreateYield() + { + var xs = EnumerableEx.Create(async yield => { + var i = 0; + while (i < 10) { + await yield.Return(i++); + } + }); + + int j = 0; + foreach (int elem in xs) { + Assert.AreEqual(elem, j); + j++; + } + + Assert.AreEqual(j, 10); + } + private static IEnumerator MyEnumerator() { yield return 1;