getpid_ut.cpp 360 B

12345678910111213141516171819
  1. #include "getpid.h"
  2. #include <library/cpp/testing/unittest/registar.h>
  3. class TGetPidTest: public TTestBase {
  4. UNIT_TEST_SUITE(TGetPidTest);
  5. UNIT_TEST(Test);
  6. UNIT_TEST_SUITE_END();
  7. public:
  8. void Test();
  9. };
  10. UNIT_TEST_SUITE_REGISTRATION(TGetPidTest);
  11. void TGetPidTest::Test() {
  12. const TProcessId pid = GetPID();
  13. UNIT_ASSERT(pid != 0);
  14. }