If the test driver for a component 'abcx_foo' in a package 'abcx' needs to use another component 'abcx_bar' in the same package, and the component doesn't otherwise need to depend on that component, then the line


   #include <xyza_bar.h>  // for testing only


should appear in the 'xyza_foo.cpp' file and the line


 #include <xyza_bar.h>


should appear in the xyza_foo.t.cpp file.


It is the component, and not the test driver that governs allowed dependencies within a package.


 





 






----- Original Message -----
From: reply@reply.github.com
To: bsl@noreply.github.com
Cc: JOHN LAKOS (BLOOMBERG/ 731 LEXIN)
At: Feb 14 2013 14:37:13



In groups/bsl/bslalg/bslalg_arraydestructionprimitives.t.cpp:
>  #include <bslalg_scalarprimitives.h>             // for testing only
>  
> -#include <bslmf_istriviallycopyable.h>           // for testing only

I mean from this line on down textually in this file.  I.e. // for testing only is not needed for any of the #include directives in this file from line 6 through the end of the includes.  I phrased it in terms of bslmf_... because it is hard to talk about line numbers in the middle of a diff.

The important thing is the principle: since this is a bslalg component, // for testing only is needed only for bslalg includes that are not already listed in the .h or .cpp file.  The includes from bslmf and other packages are already part of the component's dependency envelope, so they do not need to be noted.

            
              —
              Reply to this email directly or 
view it on GitHub.
            
            {https://github.com/notifications/beacon/8p9wzwlzvt2eivdu4muotule-bb55io9wh8ysbo5_mbk7mtroilugoo905lfk8px.gif}