GCC Code Coverage Report | |||||||||||||||||||||
|
|||||||||||||||||||||
Line | Branch | Exec | Source |
1 |
// |
||
2 |
// Created by acey on 07.09.23. |
||
3 |
// |
||
4 |
|||
5 |
#include <gtest/gtest.h> |
||
6 |
#include <test_utils.h> |
||
7 |
#include <log++.h> |
||
8 |
|||
9 |
using namespace lpp::testing; |
||
10 |
|||
11 |
4 |
TEST(nolog_rosprintf, severity_debug) { |
|
12 |
2 |
LOG_INIT(*test_argv); |
|
13 |
|||
14 |
✓✗✓✗ |
3 |
std::string output = LPP_CAPTURE_STDOUT(ROS_DEBUG(ERROR_MESSAGE, 3.3, 5.5)); |
15 |
✓✗✗✓ ✗✗✗✗ ✗✗ |
2 |
ASSERT_EQ("", output); |
16 |
} |
||
17 |
|||
18 |
4 |
TEST(nolog_rosprintf, severity_debug_once) { |
|
19 |
2 |
LOG_INIT(*test_argv); |
|
20 |
|||
21 |
✓✗✓✗ ✓✗ |
3 |
std::string output = LPP_CAPTURE_STDOUT(ROS_DEBUG_ONCE(ERROR_MESSAGE, 3.3, 5.5)); |
22 |
✓✗✗✓ ✗✗✗✗ ✗✗ |
2 |
ASSERT_EQ("", output); |
23 |
} |
||
24 |
|||
25 |
4 |
TEST(nolog_rosprintf, severity_info) { |
|
26 |
2 |
LOG_INIT(*test_argv); |
|
27 |
|||
28 |
✓✗✓✗ |
3 |
std::string output = LPP_CAPTURE_STDOUT(ROS_INFO(ERROR_MESSAGE, 3.3, 5.5)); |
29 |
✓✗✗✓ ✗✗✗✗ ✗✗ |
2 |
ASSERT_EQ("", output); |
30 |
} |
||
31 |
|||
32 |
4 |
TEST(nolog_rosprintf, severity_info_once) { |
|
33 |
2 |
LOG_INIT(*test_argv); |
|
34 |
|||
35 |
✓✗✓✗ ✓✗ |
3 |
std::string output = LPP_CAPTURE_STDOUT(ROS_INFO_ONCE(ERROR_MESSAGE, 3.3, 5.5)); |
36 |
✓✗✗✓ ✗✗✗✗ ✗✗ |
2 |
ASSERT_EQ("", output); |
37 |
} |
||
38 |
|||
39 |
4 |
TEST(nolog_rosprintf, severity_warn) { |
|
40 |
2 |
LOG_INIT(*test_argv); |
|
41 |
|||
42 |
✓✗✓✗ |
3 |
std::string output = LPP_CAPTURE_STDERR(ROS_WARN(ERROR_MESSAGE, 3.3, 5.5)); |
43 |
✓✗✗✓ ✗✗✗✗ ✗✗ |
2 |
ASSERT_EQ("", output); |
44 |
} |
||
45 |
|||
46 |
4 |
TEST(nolog_rosprintf, severity_warn_once) { |
|
47 |
2 |
LOG_INIT(*test_argv); |
|
48 |
|||
49 |
✓✗✓✗ ✓✗ |
3 |
std::string output = LPP_CAPTURE_STDERR(ROS_WARN_ONCE(ERROR_MESSAGE, 3.3, 5.5)); |
50 |
✓✗✗✓ ✗✗✗✗ ✗✗ |
2 |
ASSERT_EQ("", output); |
51 |
} |
||
52 |
|||
53 |
4 |
TEST(nolog_rosprintf, severity_error) { |
|
54 |
2 |
LOG_INIT(*test_argv); |
|
55 |
|||
56 |
✓✗✓✗ |
3 |
std::string output = LPP_CAPTURE_STDERR(ROS_ERROR(ERROR_MESSAGE, 3.3, 5.5)); |
57 |
✓✗✗✓ ✗✗✗✗ ✗✗ |
2 |
ASSERT_EQ("", output); |
58 |
} |
||
59 |
|||
60 |
4 |
TEST(nolog_rosprintf, severity_error_once) { |
|
61 |
2 |
LOG_INIT(*test_argv); |
|
62 |
|||
63 |
✓✗✓✗ ✓✗ |
3 |
std::string output = LPP_CAPTURE_STDERR(ROS_ERROR_ONCE(ERROR_MESSAGE, 3.3, 5.5)); |
64 |
✓✗✗✓ ✗✗✗✗ ✗✗ |
2 |
ASSERT_EQ("", output); |
65 |
} |
||
66 |
|||
67 |
4 |
TEST(nolog_rosprintf, severity_fatal) { |
|
68 |
2 |
LOG_INIT(*test_argv); |
|
69 |
|||
70 |
✓✗✓✗ |
3 |
std::string output = LPP_CAPTURE_STDERR(ROS_FATAL(ERROR_MESSAGE, 3.3, 5.5)); |
71 |
✓✗✗✓ ✗✗✗✗ ✗✗ |
2 |
ASSERT_EQ("", output); |
72 |
} |
||
73 |
|||
74 |
2 |
TEST(nolog_rosprintf, severity_fatal_once) { |
|
75 |
1 |
LOG_INIT(*test_argv); |
|
76 |
|||
77 |
✓✗✓✗ |
2 |
std::string output = LPP_CAPTURE_STDERR(ROS_FATAL_ONCE(ERROR_MESSAGE, 3.3, 5.5)); |
78 |
1 |
ASSERT_EQ("", output); |
|
79 |
} |
Generated by: GCOVR (Version 4.2) |