blob: dfee83f2a1294d75c54b32f7a1f44554081ccb78 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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);
}
|