1 #include <gtest/gtest.h> 2 #include <sys/sysinfo.h> 3 4 using namespace testing::ext; 5 6 class ConfGetNprocsTest : public testing::Test { SetUp()7 void SetUp() override {} TearDown()8 void TearDown() override {} 9 }; 10 11 /** 12 * @tc.name: get_nprocs_001 13 * @tc.desc: Verify whether the get_nprocs interface returns a processor core count greater than 0. 14 * @tc.type: FUNC 15 */ 16 HWTEST_F(ConfGetNprocsTest, get_nprocs_001, TestSize.Level1) 17 { 18 int numProcs = get_nprocs(); 19 EXPECT_GT(numProcs, 0); 20 }