| 32 | }; |
| 33 | |
| 34 | Y_UNIT_TEST(TestThreadId) { |
| 35 | TIdTester tst; |
| 36 | TThread thr(tst.DoRun, &tst); |
| 37 | |
| 38 | tst.Thr = &thr; |
| 39 | |
| 40 | thr.Start(); |
| 41 | thr.Join(); |
| 42 | |
| 43 | UNIT_ASSERT_EQUAL(tst.Cur, tst.Real); |
| 44 | UNIT_ASSERT(tst.Cur != 0); |
| 45 | UNIT_ASSERT(tst.Numeric != 0); |
| 46 | UNIT_ASSERT(tst.Numeric != tst.Real); |
| 47 | } |
| 48 | |
| 49 | void* ThreadProc(void*) { |
| 50 | TThread::SetCurrentThreadName("CurrentThreadSetNameTest"); |