浏览代码

add new test

/main
Xingwei Zhu 3 年前
当前提交
34040432
共有 1 个文件被更改,包括 21 次插入1 次删除
  1. 22
      Samples/UIWidgetsSamples_2019_4/Assets/Editor/Tests/Stream/TestMain.cs

22
Samples/UIWidgetsSamples_2019_4/Assets/Editor/Tests/Stream/TestMain.cs


Debug.Log("value = " + val);
});
}
/**
* Test Stream.fromFuture
*/
private void test12()
{
Future<string> getData()
{
return Future<string>.delayed(new TimeSpan(0, 0, 0, 1), () =>
{
return "My String from Future";
}).to<string>();
}
var stream = Stream<string>.fromFuture(getData());
stream.listen(val =>
{
Debug.Log("val = " + val);
});
}
test11();
test12();
return new Container();
}
}
正在加载...
取消
保存