From: Tim J. <te...@me...> - 2000-11-27 21:00:28
|
Daniel, What is your native language? Your English is just about perfect. You can have a look at a test program here: http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/gcc/cobol/test_cobr_decbin.c?rev=1.4&content-type=text/x-cvsweb-markup&cvsroot=CobolForGCC The basic concept is simple. The test program outputs the results of the tests. First time, we manually check them. After that we compare the output to the previous output and complain if there are differences. Sample output: Test 1. input: "aaa" replacing: "aaa" by "bbb" replacing: "bbb" by "ccc" output: "ccc" Test 2. ...etc It is a pain to set up the tests first time, but it is great after that because you can clean up the code and make changes without fear because you can quickly run the tests to make sure everything is still OK. See www.xprogramming.com under 'test first design'. In theory you are supposed to write the test first then the code. You keep coding until the test works. Then you write another test. Sometimes the test works already without doing any coding. Regards, Tim Josling > "Daniel H. Ardison" wrote: > > Tim, > > I will do the following: > > - cobr_insind.c > > I will put comments regarding that the returning value starts > at position 1. I don't need a pointer I need the starting > numeric position, see the code involved. > > - cobr_insrep.c > > I will modify cobr_insrep.c interface parameters so the caller > will pass three pointers to unsigned int array > occurs replacing_count times. Then I will not need any > allocation checking. > > Talking about test software I'm not sure what you want, maybe > that's because english is not my mother's language :).Anyway > could you send or point me to an example? > > Regards, > Daniel > > |