diff options
Diffstat (limited to 'tests/test-process.cpp')
-rw-r--r-- | tests/test-process.cpp | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/tests/test-process.cpp b/tests/test-process.cpp new file mode 100644 index 0000000..dfee83f --- /dev/null +++ b/tests/test-process.cpp @@ -0,0 +1,34 @@ +#include <gtest/gtest.h> + +#include "process.h" + +#include <unistd.h> + +class ProcessTest: public ::testing::Test +{ +protected: + ProcessTest(){ + } + + ~ProcessTest() override{ + } + + void SetUp() override + { + } + + void TearDown() override + { + } + +}; + +TEST_F(ProcessTest,is_running) { + auto pid{::getpid()}; + + EXPECT_NE(pid, -1); + + EXPECT_EQ(Reichwein::Process::is_running(pid), true); + + EXPECT_EQ(Reichwein::Process::is_running(999999999), false); +} |