~drizzle-trunk/drizzle/jenkins-Drizzle-Builder-213

« back to all changes in this revision

Viewing changes to unittest/README.txt

  • Committer: brian
  • Date: 2008-06-25 05:29:13 UTC
  • Revision ID: brian@localhost.localdomain-20080625052913-6upwo0jsrl4lnapl
clean slate

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
Unit tests directory structure
 
3
------------------------------
 
4
 
 
5
This is the current structure of the unit tests.  More directories
 
6
will be added over time.
 
7
 
 
8
mytap                 Source for the MyTAP library
 
9
mysys                 Tests for mysys components
 
10
  bitmap-t.c          Unit test for MY_BITMAP
 
11
  base64-t.c          Unit test for base64 encoding functions
 
12
examples              Example unit tests.
 
13
  core-t.c            Example of raising a signal in the middle of the test
 
14
                      THIS TEST WILL STOP ALL FURTHER TESTING!
 
15
  simple-t.c          Example of a standard TAP unit test
 
16
  skip-t.c            Example where some test points are skipped
 
17
  skip_all-t.c        Example of a test where the entire test is skipped
 
18
  todo-t.c            Example where test contain test points that are TODO
 
19
  no_plan-t.c         Example of a test with no plan (avoid this)
 
20
 
 
21
 
 
22
Executing unit tests
 
23
--------------------
 
24
 
 
25
To make and execute all unit tests in the directory:
 
26
 
 
27
   make test
 
28
 
 
29
Observe that the tests in the examples/ directory are just various
 
30
examples of tests and are not expected to pass.
 
31
 
 
32
 
 
33
Adding unit tests
 
34
-----------------
 
35
 
 
36
Add a file with a name of the format "foo-t.c" to the appropriate
 
37
directory and add the following to the Makefile.am in that directory
 
38
(where ... denotes stuff already there):
 
39
 
 
40
  noinst_PROGRAMS = ... foo-t
 
41
 
 
42
Note, it's important to have "-t" at the end of the filename, otherwise the
 
43
test won't be executed by 'make test' !
 
44
 
 
45
 
 
46
Documentation
 
47
-------------
 
48
 
 
49
The generated documentation is temporarily placed at:
 
50
 
 
51
      http://www.kindahl.net/mytap/doc/
 
52
 
 
53
I will move it to a better place once I figure out where and how.