Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
pistache
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
pistache
Commits
86a3e712
Unverified
Commit
86a3e712
authored
Apr 29, 2019
by
Dennis Jenkins
Committed by
GitHub
Apr 29, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #535 from FredericLeroy/bugfix/fixes-for-musl-libc
fix tests/listener_test for musl c library
parents
f0f68361
abe5f0ee
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
tests/listener_test.cc
tests/listener_test.cc
+10
-1
No files found.
tests/listener_test.cc
View file @
86a3e712
...
@@ -175,7 +175,16 @@ TEST(listener_test, listener_bind_port_not_free_throw_runtime) {
...
@@ -175,7 +175,16 @@ TEST(listener_test, listener_bind_port_not_free_throw_runtime) {
FAIL
()
<<
"Expected std::runtime_error while binding, got nothing"
;
FAIL
()
<<
"Expected std::runtime_error while binding, got nothing"
;
}
catch
(
std
::
runtime_error
const
&
err
)
{
}
catch
(
std
::
runtime_error
const
&
err
)
{
std
::
cout
<<
err
.
what
()
<<
std
::
endl
;
std
::
cout
<<
err
.
what
()
<<
std
::
endl
;
ASSERT_STREQ
(
"Address already in use"
,
err
.
what
());
int
flag
=
0
;
// GNU libc
if
(
strncmp
(
err
.
what
(),
"Address already in use"
,
sizeof
(
"Address already in use"
))
==
0
)
{
flag
=
1
;
}
// Musl libc
if
(
strncmp
(
err
.
what
(),
"Address in use"
,
sizeof
(
"Address in use"
))
==
0
)
{
flag
=
1
;
}
ASSERT_EQ
(
flag
,
1
);
}
catch
(
...
)
{
}
catch
(
...
)
{
FAIL
()
<<
"Expected std::runtime_error"
;
FAIL
()
<<
"Expected std::runtime_error"
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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