HOW2TEST.TXT  J.R. Ferguson C Library - How to Test

Jan 29,1997


How to test the library functions
=================================

For each module in the C Library there is a matching test program. Its name
can easily be found: for module xxxLIB  the  test  program  is  xxxTST.  So
CHRLIB.C, for instance, can be tested with CHRTST.C, and so forth.

In the comment headers of the test program sources you will find what lines
are  to  be  included  in  a  project  file  for  the  Turbo C 2.0 compiler
environment. You can extract these lines with an editor or with the program
PRJGEN.EXE. The command to extract CHRTST.PRJ from CHRTST.C is:

  PRJGEN CHRTST

Project files for Turbo C++ 3.1 for Windows are included. Their  names  are
xxxTSTW.PRJ.

Some  of  the  test  programs  expect  menu  sourcefiles  xxxTSTM[n].C  and
xxxTSTM[n].H, where n is an optional number  (1,2,3,...).  These  are  menu
handling   function   modules   that  can  be  generated  from  a  textfile
xxxTSTM[n].TXT, provided with  the  test  program  sources.  You  need  the
program MNUGEN.EXE, to be found in MNUGEN.ZIP. The syntax is

  MNUGEN xxxTSTM.TXT /C

If  there  is more than one menu for the test program, you may use WILD.BAT
to process them with a single command:

  WILD MNUGEN xxxTSTM*.TXT /C

The  batch  file  GENTST.BAT  combines the PRJGEN and MNUGEN actions in one
command.  So  the  easiest way to prepare for compilation of, for instance,
CHRTST.C is to issue the command

  GENTST CHRTST

Once the project files and the menu sources are generated, compile and link
the test program and execute it.

There are some more batchfiles you may find useful while further developing
the C library.

DELCTMP.BAT  cleans up the directory by deleting superflous files (objects,
             backups, etc). It uses the XD.COM which  is  included  in  the
             package.
HLPCT.BAT    displays help files generated during development.
HLPCTX.BAT   does the same from a DOS shell, the exits from that shell.
TCFD.BAT     generates  one object module and stores it in TCFD.LIB.
             Usage: TCFD modulename
TCFDOBJ.BAT  generates all library object modules.
TCFDLIB.BAT  stores all library  object  modules  that  are  found  in  the
             current directory in TCFD.LIB.
TCFDHLP.BAT  generates all library help files into a subdirectory HLP.
TCFDMAKE.BAT regenerates the complete library and help for turbo C 2.0.
TCFW.PRJ     project file to generate all object modules for Turbo C++ 3.1. 
TCFW.BAT     stores one C++ library oject into TCFW.LIB.
             Usage: TCFW modulename
TCFWLIB.BAT  stores all library  object  modules  that  are  found  in  the
             current directory into TCFW.LIB.
