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
Stack Of Tasks
dynamic-graph
Commits
e70e3c8a
Commit
e70e3c8a
authored
Feb 04, 2020
by
Florent Lamiraux
Committed by
Florent Lamiraux florent@laas.fr
Feb 04, 2020
Browse files
Add a test that sets a signal to empty string.
parent
70864112
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/signal-ptr.cpp
View file @
e70e3c8a
...
...
@@ -297,3 +297,19 @@ BOOST_AUTO_TEST_CASE(plug_signal_string) {
std
::
cout
<<
"res="
<<
res
<<
std
::
endl
;
BOOST_CHECK
(
res
==
str
);
}
BOOST_AUTO_TEST_CASE
(
set_signal_string
)
{
Signal
<
std
::
string
,
int
>
s
(
"signal"
);
std
::
string
str
(
""
);
std
::
ostringstream
os
;
os
<<
str
;
std
::
istringstream
value
(
os
.
str
());
try
{
s
.
set
(
value
);
}
catch
(
const
std
::
exception
&
exc
)
{
std
::
cout
<<
exc
.
what
()
<<
std
::
endl
;
BOOST_CHECK
(
!
"Tentative to set signal to empty string"
);
}
}
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