Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
Kea
Commits
d5137a32
Commit
d5137a32
authored
Dec 07, 2012
by
Michal 'vorner' Vaner
Browse files
[2377] cleanup: Simplify the test callback
parent
80de8b94
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/lib/dns/tests/master_loader_unittest.cc
View file @
d5137a32
...
...
@@ -40,23 +40,19 @@ class MasterLoaderTest : public ::testing::Test {
public:
MasterLoaderTest
()
:
callbacks_
(
boost
::
bind
(
&
MasterLoaderTest
::
callback
,
this
,
true
,
_1
,
_2
,
_3
),
&
errors_
,
_1
,
_2
,
_3
),
boost
::
bind
(
&
MasterLoaderTest
::
callback
,
this
,
false
,
_1
,
_2
,
_3
))
&
warnings_
,
_1
,
_2
,
_3
))
{}
/// Concatenate file, line, and reason, and add it to either errors
/// or warnings
void
callback
(
bool
error
,
const
std
::
string
&
file
,
size_t
line
,
void
callback
(
vector
<
string
>*
target
,
const
std
::
string
&
file
,
size_t
line
,
const
std
::
string
reason
)
{
std
::
stringstream
ss
;
ss
<<
reason
<<
" ["
<<
file
<<
":"
<<
line
<<
"]"
;
if
(
error
)
{
errors_
.
push_back
(
ss
.
str
());
}
else
{
warnings_
.
push_back
(
ss
.
str
());
}
target
->
push_back
(
ss
.
str
());
}
void
addRRset
(
const
Name
&
name
,
const
RRClass
&
rrclass
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment