File tree 1 file changed +5
-31
lines changed
iceoryx_posh/test/moduletests
1 file changed +5
-31
lines changed Original file line number Diff line number Diff line change 1
1
// Copyright (c) 2019 by Robert Bosch GmbH. All rights reserved.
2
- // Copyright (c) 2021 by Apex.AI Inc. All rights reserved.
2
+ // Copyright (c) 2021 - 2022 by Apex.AI Inc. All rights reserved.
3
3
//
4
4
// Licensed under the Apache License, Version 2.0 (the "License");
5
5
// you may not use this file except in compliance with the License.
@@ -49,31 +49,13 @@ class MePooSegmentMock
49
49
class SegmentManager_test : public Test
50
50
{
51
51
public:
52
- SegmentManager_test ()
53
- : surpressOutput{SurpressOutput (true )}
52
+ void SetUp () override
54
53
{
55
54
}
56
-
57
- ~SegmentManager_test ()
58
- {
59
- if (surpressOutput)
60
- {
61
- if (Test::HasFailure ())
62
- {
63
- std::cout << testing::internal::GetCapturedStderr () << std::endl;
64
- }
65
- else
66
- {
67
- (void )testing::internal::GetCapturedStderr ();
68
- }
69
- }
70
- }
71
-
72
- void SetUp (){};
73
- void TearDown ()
55
+ void TearDown () override
74
56
{
75
57
iox::rp::BaseRelativePointer::unregisterAll ();
76
- };
58
+ }
77
59
78
60
MePooConfig getMempoolConfig ()
79
61
{
@@ -109,16 +91,8 @@ class SegmentManager_test : public Test
109
91
return config;
110
92
}
111
93
112
- bool SurpressOutput (const bool v)
113
- {
114
- if (v)
115
- {
116
- testing::internal::CaptureStderr ();
117
- }
118
- return v;
119
- }
94
+ iox::cxx::GenericRAII logLevelScopeGuard{iox::LoggerPosh ().SetLogLevelForScope (iox::log ::LogLevel::kError )};
120
95
121
- bool surpressOutput;
122
96
static constexpr size_t MEM_SIZE{20000 };
123
97
char memory[MEM_SIZE];
124
98
iox::posix::Allocator allocator{memory, MEM_SIZE};
You can’t perform that action at this time.
0 commit comments