Debian Codegraph @

src/tests/logmanagertest.cpp

raw symbols SCIP
1 // SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
2 //
3 // SPDX-License-Identifier: GPL-3.0-only
4
5 #include "logmanagertest.h"
6
7 // Sets up the test fixture.
8 void LogManagerTest::SetUp()
9 {
10
11 }
12
13 // Tears down the test fixture.
14 void LogManagerTest::TearDown()
15 {
16
17 }
18
19 TEST_F(LogManagerTest, setSystemlog)
20 {
21 // EXPECT_EQ(DBMLogManager::setSystemLog(),true);
22
23 DBMLogManager::setSystemLog(true);
24
25 }
26
27 TEST_F(LogManagerTest, registerConsoleAppender)
28 {
29 DBMLogManager::registerConsoleAppender();
30 }
31
32
33 TEST_F(LogManagerTest, registerFileppender)
34 {
35 DBMLogManager::registerFileAppender();
36 }
37
38 TEST_F(LogManagerTest, getlogFilePath)
39 {
40 QString ret = DBMLogManager::getlogFilePath();
41 qInfo() << "ret = " << ret;
42 }
43
44 TEST_F(LogManagerTest, setLogFormat)
45 {
46 QString format = "%{time}{yyyy-MM-dd, HH:mm:ss.zzz} [%{type:-7}] [%{file:-20} %{function:-35} %{line}] %{message}\n";
47 DBMLogManager::setLogFormat(format);
48 }