aboutsummaryrefslogtreecommitdiffstats
path: root/util/system/info_ut.cpp
blob: 61618f40ac5fe47237f30ee0d06560e9e9ec656c (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);