v2 / vlib / v / tests / concurrency / thread_to_string_test.v
8 lines · 7 sloc · 115 bytes · 6488041a749df9762348d019c4223908c476f2e2
Raw
1fn ret_ten() int {
2 return 10
3}
4
5fn test_thread_str() {
6 th := spawn ret_ten()
7 assert th.str() == 'thread(int)'
8}
9