comparison 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
comparison
equal deleted inserted replaced
150:3258399cba83 151:ec91a6dfa5b3
843 } finally { 843 } finally {
844 foreach (var m in log) 844 foreach (var m in log)
845 Console.WriteLine(m); 845 Console.WriteLine(m);
846 } 846 }
847 } 847 }
848
849 #if NET_4_5
850
851 [TestMethod]
852 public async void TaskInteropTest() {
853 var promise = new Promise<int>();
854 promise.Resolve(10);
855 var res = await promise;
856
857 Assert.AreEqual(10, res);
858 }
859
860 #endif
848 } 861 }
849 } 862 }
850 863