• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #include <gtest/gtest.h>
2 #include <unistd.h>
3 
4 using namespace testing::ext;
5 
6 class LegacyGetpagesizeTest : public testing::Test {
SetUp()7     void SetUp() override {}
TearDown()8     void TearDown() override {}
9 };
10 
11 /**
12  * @tc.name: getpagesize_001
13  * @tc.desc: Verify that the page size returned by the getpagesize function is equal to the natural page size of the
14  *           hardware platform.
15  * @tc.type: FUNC
16  */
17 HWTEST_F(LegacyGetpagesizeTest, getpagesize_001, TestSize.Level1)
18 {
19     long naturalPageSize = getpagesize();
20     long pageSize = sysconf(_SC_PAGESIZE);
21     EXPECT_EQ(pageSize, naturalPageSize);
22 }