Lines Matching defs:std

57 using LogMethodFunc = std::function<void(const std::string &msg)>;
59 static const std::array<LogMethodFunc, METHODS_NUMBER> LOG_C_METHODS = {
60 [] (const std::string &msg) {
63 [] (const std::string &msg) {
66 [] (const std::string &msg) {
69 [] (const std::string &msg) {
72 [] (const std::string &msg) {
77 static const std::array<LogMethodFunc, METHODS_NUMBER> LOG_CPP_METHODS = {
78 [] (const std::string &msg) {
81 [] (const std::string &msg) {
84 [] (const std::string &msg) {
87 [] (const std::string &msg) {
90 [] (const std::string &msg) {
95 static std::string PopenToString(const std::string &command)
97 std::string str;
109 std::cout << "PopenToString res: " << str << std::endl;
132 static std::string RandomStringGenerator()
134 std::string str;
145 const std::array<LogMethodFunc, METHODS_NUMBER> &logMethods)
147 std::string logMsg(RandomStringGenerator());
149 logMethods.at(methodType)(logMsg + std::to_string(i));
152 std::string logMsgs = PopenToString("/system/bin/hilog -x");
154 std::stringstream ss(logMsgs);
155 std::string str;
158 if (str.find(logMsg) != std::string::npos) {
169 static void FlowCtlTest(const HiLogLabel &label, const std::string keyWord)
171 const std::string str = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
177 std::string logMsgs = PopenToString("hilog -x -T LOGLIMIT");
178 EXPECT_TRUE(logMsgs.find(keyWord) != std::string::npos);
382 std::string logMsg(RandomStringGenerator());
387 std::string logMsgs = PopenToString("/system/bin/hilog -x");
389 std::stringstream ss(logMsgs);
390 std::string str;
393 if (str.find(logMsg) != std::string::npos) {
408 std::string str;
409 std::string hilogControlRights = "srw-rw----";
410 std::string logMsgs = PopenToString("ls -al //dev/unix/socket/hilogControl");
411 std::stringstream ss(logMsgs);
413 EXPECT_TRUE(str.find(hilogControlRights) != std::string::npos);
424 const std::string pidCtrlLog = "DROPPED";
437 const std::string domainCtrlLog = "dropped";