mem_info_ut.cpp 492 B

123456789101112131415161718192021
  1. #include "mem_info.h"
  2. #include <library/cpp/testing/unittest/registar.h>
  3. #include "info.h"
  4. class TMemInfoTest: public NUnitTest::TTestBase {
  5. UNIT_TEST_SUITE(TMemInfoTest)
  6. UNIT_TEST(TestMemInfo)
  7. UNIT_TEST_SUITE_END();
  8. void TestMemInfo() {
  9. using namespace NMemInfo;
  10. TMemInfo stats = GetMemInfo();
  11. UNIT_ASSERT(stats.RSS >= NSystemInfo::GetPageSize());
  12. UNIT_ASSERT(stats.VMS >= stats.RSS);
  13. }
  14. };
  15. UNIT_TEST_SUITE_REGISTRATION(TMemInfoTest)