Home Page
Programmatic Testing of the Standard Template Library Containers
 
by D. Hoffman, J. MacDonald and P. Strooper 
 
formalWARE 
    project  

  Participating 
     Organizations 
  Research   
     Topics 
  People 
   

formalWARE 
    results  

  Overview 
  Publications 
  Presentations 
  Tools   
  Methods 
  Examples   
  Training 

formalWARE  
  information  

  Events 
  Index  
  Links   
  Contacts

 
Abstract 
In 1968, McIlroy proposed a software industry based on reusable components, serving roughly the same role that chips do in the hardware industry.  After 30 years, McIlroy's vision is becoming a reality.  In particular, the C++ Standard Template Library (STL) is an ANSI standard and is being shipped with C++ compilers.  While considerable attention has been given to techniques for developing components, little is known about testing these components. 

This paper describes an STL conformance test suite currently under development.  Test suites for all of the STL containers have been written, demonstrating the feasibility of thorough and highly automated testing of industrial component libraries.  We describe affordable test suites that provide good code and boundary value coverage, including the thousands of cases that naturally occur from combinations of boundary values.  We show how two simple oracles can provide fully automated output checking for all the containers.  We refine the traditional categories of black-box and white-box testing to specification-based, implementation-based and implementation-dependent testing, and show how these three categories highlight the key cost/thoroughness tradeoffs. 

 


Download postscript  
Download PDF 



 

.