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
a919c148
Commit
a919c148
authored
Jan 31, 2020
by
Olivier Stasse
Browse files
Add tests/signal-all.cpp
parent
d5039779
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/signal-all.cpp
View file @
a919c148
...
...
@@ -210,7 +210,28 @@ BOOST_AUTO_TEST_CASE(signal_caster_basics) {
/// Unregister a type
asig_caster
->
unregisterCast
(
typeid
(
double
));
/// Unregister the type a second time to generate exception
bool
res
=
false
;
try
{
asig_caster
->
unregisterCast
(
typeid
(
double
));
}
catch
(
ExceptionSignal
&
aes
)
{
res
=
(
aes
.
getCode
()
==
ExceptionSignal
::
GENERIC
);
}
BOOST_CHECK
(
res
);
/// Get the type cast to generate exception
res
=
false
;
double
ad
=
2.0
;
output_test_stream
output
;
try
{
asig_caster
->
disp
(
ad
,
output
);
}
catch
(
ExceptionSignal
&
aes
)
{
res
=
(
aes
.
getCode
()
==
ExceptionSignal
::
BAD_CAST
);
}
BOOST_CHECK
(
res
);
asig_caster
->
destroy
();
BOOST_CHECK
(
true
);
}
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