GCC Code Coverage Report | |||||||||||||||||||||
|
|||||||||||||||||||||
Line | Branch | Exec | Source |
1 |
// |
||
2 |
// Created by acey on 06.09.23. |
||
3 |
// |
||
4 |
|||
5 |
#include <gtest/gtest.h> |
||
6 |
#include <test_utils.h> |
||
7 |
#include <log++.h> |
||
8 |
|||
9 |
4 |
TEST(nolog_basic, glog_syntax_severity_debug){ |
|
10 |
2 |
LOG_INIT(*test_argv); |
|
11 |
✓✗✓✗ |
2 |
DLOG(INFO) << "TEst"; |
12 |
|||
13 |
✓✗✓✗ |
3 |
std::string output = LPP_CAPTURE_STDOUT(DLOG(INFO) << "Test"); |
14 |
✓✗✗✓ ✗✗✗✗ ✗✗ |
2 |
ASSERT_EQ("", output); |
15 |
} |
||
16 |
|||
17 |
4 |
TEST(nolog_basic, glog_syntax_severity_info){ |
|
18 |
2 |
LOG_INIT(*test_argv); |
|
19 |
|||
20 |
✓✗✓✗ |
3 |
std::string output = LPP_CAPTURE_STDOUT(LOG(INFO) << "Test123"); |
21 |
✓✗✗✓ ✗✗✗✗ ✗✗ |
2 |
ASSERT_EQ("", output); |
22 |
} |
||
23 |
|||
24 |
4 |
TEST(nolog_basic, glog_syntax_severity_warning){ |
|
25 |
2 |
LOG_INIT(*test_argv); |
|
26 |
|||
27 |
✓✗✓✗ |
3 |
std::string output = LPP_CAPTURE_STDERR(LOG(WARNING) << "Test"); |
28 |
✓✗✗✓ ✗✗✗✗ ✗✗ |
2 |
ASSERT_EQ("", output); |
29 |
} |
||
30 |
|||
31 |
4 |
TEST(nolog_basic, glog_syntax_severity_error){ |
|
32 |
2 |
LOG_INIT(*test_argv); |
|
33 |
|||
34 |
✓✗✓✗ |
3 |
std::string output = LPP_CAPTURE_STDERR(LOG(ERROR) << "Test"); |
35 |
✓✗✗✓ ✗✗✗✗ ✗✗ |
2 |
ASSERT_EQ("", output); |
36 |
} |
||
37 |
|||
38 |
4 |
TEST(nolog_basic, glog_syntax_severity_fatal){ |
|
39 |
2 |
LOG_INIT(*test_argv); |
|
40 |
|||
41 |
✓✗✓✗ |
3 |
std::string output = LPP_CAPTURE_STDERR(LOG(FATAL) << "Test"); |
42 |
✓✗✗✓ ✗✗✗✗ ✗✗ |
2 |
ASSERT_EQ("", output); |
43 |
} |
||
44 |
|||
45 |
//! ################ lpp ################ |
||
46 |
4 |
TEST(nolog_basic, lpp_syntax_severity_debug){ |
|
47 |
2 |
LOG_INIT(*test_argv); |
|
48 |
|||
49 |
✓✗✓✗ ✓✗ |
3 |
std::string output = LPP_CAPTURE_STDOUT(LOG(D, "" << "Test")); |
50 |
✓✗✗✓ ✗✗✗✗ ✗✗ |
2 |
ASSERT_EQ("", output); |
51 |
} |
||
52 |
|||
53 |
4 |
TEST(nolog_basic, lpp_syntax_severity_info){ |
|
54 |
2 |
LOG_INIT(*test_argv); |
|
55 |
|||
56 |
✓✗✓✗ ✓✗ |
3 |
std::string output = LPP_CAPTURE_STDOUT(LOG(I, "" << "Test")); |
57 |
✓✗✗✓ ✗✗✗✗ ✗✗ |
2 |
ASSERT_EQ("", output); |
58 |
} |
||
59 |
|||
60 |
4 |
TEST(nolog_basic, lpp_syntax_severity_warning){ |
|
61 |
2 |
LOG_INIT(*test_argv); |
|
62 |
|||
63 |
✓✗✓✗ ✓✗ |
3 |
std::string output = LPP_CAPTURE_STDERR(LOG(W, "" << "Test")); |
64 |
✓✗✗✓ ✗✗✗✗ ✗✗ |
2 |
ASSERT_EQ("", output); |
65 |
} |
||
66 |
|||
67 |
4 |
TEST(nolog_basic, lpp_syntax_severity_error){ |
|
68 |
2 |
LOG_INIT(*test_argv); |
|
69 |
|||
70 |
✓✗✓✗ ✓✗ |
3 |
std::string output = LPP_CAPTURE_STDERR(LOG(E, "" << "Test")); |
71 |
✓✗✗✓ ✗✗✗✗ ✗✗ |
2 |
ASSERT_EQ("", output); |
72 |
} |
||
73 |
|||
74 |
//! ################ Roslog ################ |
||
75 |
4 |
TEST(nolog_basic, roslog_syntax_severity_debug){ |
|
76 |
2 |
LOG_INIT(*test_argv); |
|
77 |
|||
78 |
✓✗ | 3 |
std::string output = LPP_CAPTURE_STDOUT(ROS_DEBUG_STREAM("Test")); |
79 |
✓✗✗✓ ✗✗✗✗ ✗✗ |
2 |
ASSERT_EQ("", output); |
80 |
} |
||
81 |
|||
82 |
4 |
TEST(nolog_basic, roslog_syntax_severity_info){ |
|
83 |
2 |
LOG_INIT(*test_argv); |
|
84 |
|||
85 |
✓✗ | 3 |
std::string output = LPP_CAPTURE_STDOUT(ROS_INFO_STREAM("Test")); |
86 |
✓✗✗✓ ✗✗✗✗ ✗✗ |
2 |
ASSERT_EQ("", output); |
87 |
} |
||
88 |
|||
89 |
4 |
TEST(nolog_basic, roslog_syntax_severity_warning){ |
|
90 |
2 |
LOG_INIT(*test_argv); |
|
91 |
|||
92 |
✓✗ | 3 |
std::string output = LPP_CAPTURE_STDERR(ROS_WARN_STREAM("Test")); |
93 |
✓✗✗✓ ✗✗✗✗ ✗✗ |
2 |
ASSERT_EQ("", output); |
94 |
} |
||
95 |
|||
96 |
4 |
TEST(nolog_basic, roslog_syntax_severity_error){ |
|
97 |
2 |
LOG_INIT(*test_argv); |
|
98 |
|||
99 |
✓✗ | 3 |
std::string output = LPP_CAPTURE_STDERR(ROS_ERROR_STREAM("Test")); |
100 |
✓✗✗✓ ✗✗✗✗ ✗✗ |
2 |
ASSERT_EQ("", output); |
101 |
} |
||
102 |
|||
103 |
2 |
TEST(nolog_basic, roslog_syntax_severity_fatal){ |
|
104 |
1 |
LOG_INIT(*test_argv); |
|
105 |
|||
106 |
2 |
std::string output = LPP_CAPTURE_STDERR(ROS_FATAL_STREAM("Test")); |
|
107 |
1 |
ASSERT_EQ("", output); |
|
108 |
} |
Generated by: GCOVR (Version 4.2) |