|
Boost Users : |
Subject: Re: [Boost-users] [unittest] How to only ignore child terminate?
From: Richard (legalize+jeeves_at_[hidden])
Date: 2011-01-26 15:48:13
[Please do not mail me a copy of your followup]
boost-users_at_[hidden] spake the secret code
<875837.92076.qm_at_[hidden]> thusly:
>How can I only ignore child.terminate() while running unittests?
Decouple the code from the concrete behavior of this function and use
a test double in testing scenarios.
One way to do this would be to extract the text that calls
child.terminate() into its own virtual method and override that method
in testing.
-- "The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download <http://legalizeadulthood.wordpress.com/the-direct3d-graphics-pipeline/> Legalize Adulthood! <http://legalizeadulthood.wordpress.com>
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net