home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.c++.moderated      Moderated discussion of C++ superhackery      33,346 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 32,829 of 33,346   
   =?UTF-8?Q?Tobias=20M=C3=BCller?= to Ian Collins   
   Re: Unit Testing Frameworks (was Re: Sin   
   26 Jan 13 19:02:05   
   
   l-september.org> e11c9a8d   
   From: troplin@bluewin.ch   
      
   Ian Collins  wrote:   
   > Richard wrote:   
   >> It does.  The problem with link-time substitution is that I can't take   
   >> one piece of code and make it use the link-time substitute and have   
   >> another piece of code that uses the real thing and have them both live   
   >> in the same executable.   
   >   
   > Which I'd consider to be positive.  I covered this last time in the   
   > section of my post you chose to ignore.   
      
   But with DI you have the choice. You can have as many executables as you   
   like.   
      
   >> By using link-time substitution, I'm forced   
   >> into having more test executables than I need.   
   >   
   > Use a test framework or IDE that works with multiple executable.  Fine   
   > grained tests are a good thing.   
   >   
   >> If I use DI, then it's   
   >> all under control fo the test and not the *linker*.   
   >   
   > But you have to create test versions of the collaborators, you can't   
   > simply leave the job to the mocking framework.   
   >   
   > I don't like making extra work for myself.  Maybe this stems form most   
   > of my work being one layer above the operating system APIs, so I end up   
   > mocking (often an automated process) a significant number of system   
   > libraries.   
      
   Creating a mock and injecting it into the code under test are two   
   completely orthogonal topics. DI only covers the injection.   
      
   Tobi   
      
      
   --   
         [ See http://www.gotw.ca/resources/clcm.htm for info about ]   
         [ comp.lang.c++.moderated.    First time posters: Do this! ]   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca