Changes between Version 2 and Version 3 of UnitTests


Ignore:
Timestamp:
Apr 30, 2010 11:23:54 AM (12 years ago)
Author:
toby
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • UnitTests

    v2 v3  
    33=== Design philosophy ===
    44
    5 The goal is that the unit tests will exercise as much possible code as can be managed. Unit tests are expected to change and expand as code is augmented.
     5The goal is that the unit tests will exercise as much possible code as can be managed. Unit tests are expected to change and expand as code is augmented. Unit tests have several roles:
     6 * to insure that module interfaces remain static, so that downstream code is not broken by changes in a module
     7 * to validate computations against independently derived values (from other software or reference materials)
     8 * to confirm that results are platform independent
     9 * to catch software bugs as code is augmented and adapted
     10Where possible, unit tests should be both comprehensive and quick.
    611
    712=== Implementation ===
    813
    9 Tests are to be included directly in the GSAS-II module with a
     14Tests are to be included directly in the GSAS-II module by defining test functions. The test functions should be named to start with the string "test" and should not require any arguments. The should use assert or raise to report an unexpected result and should not print anything if the test succeeds. If the test requires more input than can comfortably be included in the module itself, the input should be placed in directory {{{testinp\}}}. If routines are used to generate this input, the generating routines can also be placed here.
     15