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,814 of 33,346   
   Richard to All   
   Re: Unit Testing Frameworks (was Re: Sin   
   24 Jan 13 11:57:40   
   
   From: legalize+jeeves@mail.xmission.com   
      
   [Please do not mail me a copy of your followup]   
      
   Ian Collins  spake the secret code   
    thusly:   
      
   >Richard wrote:   
   >How do you decouple your code form any system calls it makes?   
      
   Since this is comp.lang.c++, we have any number of techniques that   
   allow us to decouple ourselves from system calls without resorting to   
   link-time substitution.  Interfaces and templates are two.   
      
   >Your tone suggests that you consider link-time substitution (or   
   >interposition) something to be avoided rather then the commonly used   
   >testing technique that it is.   
      
   I avoid it because it's been problematic and harder for developers to   
   understand every time I've seen it used.  So yes, it is less desirable   
   than using interfaces or something else that is completely under   
   control of the test instead of under control of the build system.  The   
   only one I can think of that is worse than link time substitution is   
   abuse of the preprocessor.   
   --   
   "The Direct3D Graphics Pipeline" free book    
         The Computer Graphics Museum    
             The Terminals Wiki    
      Legalize Adulthood! (my blog)    
      
      
         [ 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