Show
Ignore:
Timestamp:
09/13/09 23:14:58 (15 years ago)
Author:
smidl
Message:

doc

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • library/doc/html/unit_testing.html

    r608 r614  
    33<head> 
    44<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> 
    5 <title>mixpp: Unit testing of BDM using UnitTest++</title> 
     5<title>mixpp: Unit testing of BDM</title> 
    66<link href="tabs.css" rel="stylesheet" type="text/css"/> 
    77<link href="doxygen.css" rel="stylesheet" type="text/css"/> 
     
    5959    </ul> 
    6060  </div> 
     61  <div class="navpath"><a class="el" href="dev_guide2.html">Howto Contribute to BDM - Advanced development</a> 
     62  </div> 
    6163</div> 
    6264<div class="contents"> 
    6365 
    6466 
    65 <h1><a class="anchor" id="unit_testing">Unit testing of BDM using UnitTest++ </a></h1><p>Unit tests are simple, fast and easy to run tests of small pieces of code (the "units") designed to reassure developers that individual parts of the developped functionality behave as they're meant to. BDM being an object-oriented library, the independent units are classes, tested by calling their individual methods and comparing actual to expected results.</p> 
     67<h1><a class="anchor" id="unit_testing">Unit testing of BDM </a></h1><p>Unit tests are simple, fast and easy to run tests of small pieces of code (the "units") designed to reassure developers that individual parts of the developped functionality behave as they're meant to. BDM being an object-oriented library, the independent units are classes, tested by calling their individual methods and comparing actual to expected results.</p> 
    6668<p>Unit tests are especially useful for C++, where the simplest change can introduce (or uncover) a difficult-to-find bug. They also facilitate changing the internal structure of classes without modifying their external behavior - unit tests can be run before and after such a change to make sure the behavior had indeed stayed the same. More ambitiously, tests can be written before implementing new functionality, serving as its machine-checkable specification. Some authorities go so far as to demand that "not a single line of code" be written before having a failing unit test for it first, but BDM unit testing isn't that demanding - it does facilitate the style for developers who prefer it, but most BDM code is tested retroactively, with new tests suggested by various considerations (see below).</p> 
    6769<h2><a class="anchor" id="Setup"> 
     
    106108<p>Ideally, unit tests should test every method of every class (there are higher ideals, but they're even less realistic). Failing that, at least some methods of every class should be tested. Coverage tools (e.g. gcov) can show which parts of the library are not exercised by testsuite. </p> 
    107109</div> 
    108 <hr size="1"/><address style="text-align: right;"><small>Generated on Tue Sep 8 22:11:32 2009 for mixpp by&nbsp; 
     110<hr size="1"/><address style="text-align: right;"><small>Generated on Sun Sep 13 22:40:40 2009 for mixpp by&nbsp; 
    109111<a href="http://www.doxygen.org/index.html"> 
    110112<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>