title: GMOCK - whats the benefit over running my sample code
body: <p>I just started learning GMOCK - a functionality to test C++ Class Methods. After doing a sample of them I could not understand why we are doing via GMOCK - a round about way / technique to test the methods. I find the GMOCK to only test whether for a given input the code gives desired output. </p>
  
  <p>So would my sample code i.e. writing sample code calling Class methods would do so? I can very well verify the output also to confirm.</p>
  
  <p>Now say the code is in layered architecture and one team owns two layers of ownership. The second layer calls interfaces of third layer belonging to other team. Assume second layer of code is highly volatile for modification related to third layer's API. So each time I touch I completely modify my GMOCK interfaces also.</p>
  
  <p>GCC and other compilers gives options to link and bind defined methods to user defined methods.</p>
  
  <p>Exactly where are we benefiting using GMOCK? I might be missing hence the reason to post my query.</p>