info_ut.cpp 581 B

12345678910111213141516171819202122
  1. #include "info.h"
  2. #include <library/cpp/testing/unittest/registar.h>
  3. class TSysInfoTest: public TTestBase {
  4. UNIT_TEST_SUITE(TSysInfoTest);
  5. UNIT_TEST(TestNumberOfCpus)
  6. UNIT_TEST(TestGetPageSize)
  7. UNIT_TEST_SUITE_END();
  8. private:
  9. inline void TestNumberOfCpus() {
  10. UNIT_ASSERT(NSystemInfo::NumberOfCpus() > 0);
  11. UNIT_ASSERT_EQUAL(NSystemInfo::NumberOfCpus(), NSystemInfo::CachedNumberOfCpus());
  12. }
  13. inline void TestGetPageSize() {
  14. UNIT_ASSERT(NSystemInfo::GetPageSize() >= 4096);
  15. }
  16. };
  17. UNIT_TEST_SUITE_REGISTRATION(TSysInfoTest);