diff Implab.Test/AsyncTests.cs @ 151:ec91a6dfa5b3 v2

Added support for 'await' operator to promises
author cin
date Thu, 04 Feb 2016 02:43:05 +0300
parents eb793fbbe4ea
children 8200ab154c8a
line wrap: on
line diff
--- a/Implab.Test/AsyncTests.cs	Sat Dec 12 22:12:44 2015 +0300
+++ b/Implab.Test/AsyncTests.cs	Thu Feb 04 02:43:05 2016 +0300
@@ -845,6 +845,19 @@
                     Console.WriteLine(m);
             }
         }
+
+        #if NET_4_5
+
+        [TestMethod]
+        public async void TaskInteropTest() {
+            var promise = new Promise<int>();
+            promise.Resolve(10);
+            var res = await promise;
+
+            Assert.AreEqual(10, res);
+        }
+
+        #endif
     }
 }