• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #include <gtest/gtest.h>
2 #include <sys/inotify.h>
3 
4 using namespace testing::ext;
5 
6 class LinuxInotifyinitTest : public testing::Test {
SetUp()7     void SetUp() override {}
TearDown()8     void TearDown() override {}
9 };
10 
11 /**
12  * @tc.name: inotify_init_001
13  * @tc.desc: This test verifies inotify the init function can successfully create an inotify instance and make
14  *           corresponding assertion judgments.
15  * @tc.type: FUNC
16  */
17 HWTEST_F(LinuxInotifyinitTest, inotify_init_001, TestSize.Level1)
18 {
19     int fd = inotify_init();
20     ASSERT_NE(fd, -1);
21     close(fd);
22 }