TarsCloud_TarsCpp/unit-test/util/test_tc_port.cpp
2022-02-25 11:15:12 +08:00

36 lines
585 B
C++
Executable File

#include "util/tc_port.h"
#include "util/tc_common.h"
#include <cmath>
#include "gtest/gtest.h"
#include <iostream>
#include <vector>
using namespace std;
using namespace tars;
class UtilPortTest : public testing::Test
{
public:
//添加日志
static void SetUpTestCase()
{
}
static void TearDownTestCase()
{
}
virtual void SetUp() //TEST跑之前会执行SetUp
{
}
virtual void TearDown() //TEST跑完之后会执行TearDown
{
}
};
TEST_F(UtilPortTest, testExec)
{
string err;
string result = TC_Port::exec("ls '*.txt'", err);
cout << result << endl;
}