aboutsummaryrefslogtreecommitdiffstats
path: root/util/system/mem_info_ut.cpp
blob: 147c5b6b215f3fa4a13ec45d17720a18c60d1e68 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include "mem_info.h"

#include <library/cpp/testing/unittest/registar.h>

#include "info.h" 

class TMemInfoTest: public NUnitTest::TTestBase { 
    UNIT_TEST_SUITE(TMemInfoTest) 
    UNIT_TEST(TestMemInfo)
    UNIT_TEST_SUITE_END(); 
    void TestMemInfo() {
        using namespace NMemInfo;

        TMemInfo stats = GetMemInfo();

        UNIT_ASSERT(stats.RSS >= NSystemInfo::GetPageSize());
        UNIT_ASSERT(stats.VMS >= stats.RSS);
    }
};

UNIT_TEST_SUITE_REGISTRATION(TMemInfoTest)