Back to home page

MySQL Cross Reference

 
 

    


0001 
0002 Unit tests directory structure
0003 ------------------------------
0004 
0005 This is the current structure of the unit tests.  More directories
0006 will be added over time.
0007 
0008 mytap                 Source for the MyTAP library
0009 mysys                 Tests for mysys components
0010   base64-t.c          Unit test for base64 encoding functions
0011 examples              Example unit tests.
0012   core-t.c            Example of raising a signal in the middle of the test
0013                       THIS TEST WILL STOP ALL FURTHER TESTING!
0014   simple-t.c          Example of a standard TAP unit test
0015   skip-t.c            Example where some test points are skipped
0016   skip_all-t.c        Example of a test where the entire test is skipped
0017   todo-t.c            Example where test contain test points that are TODO
0018   no_plan-t.c         Example of a test with no plan (avoid this)
0019 
0020 
0021 Executing unit tests
0022 --------------------
0023 
0024 To make and execute all unit tests in the directory:
0025 
0026    make test
0027 
0028 Observe that the tests in the examples/ directory are just various
0029 examples of tests and are not expected to pass.
0030 
0031 
0032 Adding unit tests
0033 -----------------
0034 
0035 Add a file with a name of the format "foo-t.c" to the appropriate
0036 directory and add the following to the Makefile.am in that directory
0037 (where ... denotes stuff already there):
0038 
0039   noinst_PROGRAMS = ... foo-t
0040 
0041 Note, it's important to have "-t" at the end of the filename, otherwise the
0042 test won't be executed by 'make test' !
0043 
0044 
0045 Documentation
0046 -------------
0047 
0048 The generated documentation is temporarily placed at:
0049 
0050       http://www.kindahl.net/mytap/doc/
0051 
0052 I will move it to a better place once I figure out where and how.