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

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

class TSysInfoTest: public TTestBase {
    UNIT_TEST_SUITE(TSysInfoTest);
    UNIT_TEST(TestNumberOfCpus)
    UNIT_TEST(TestGetPageSize)
    UNIT_TEST_SUITE_END();
 
private:
    inline void TestNumberOfCpus() {
        UNIT_ASSERT(NSystemInfo::NumberOfCpus() > 0);
        UNIT_ASSERT_EQUAL(NSystemInfo::NumberOfCpus(), NSystemInfo::CachedNumberOfCpus());
    }

    inline void TestGetPageSize() {
        UNIT_ASSERT(NSystemInfo::GetPageSize() >= 4096);
    }
};

UNIT_TEST_SUITE_REGISTRATION(TSysInfoTest);