Evi Certification

 

If you are interested in qualifying, do the following things for your tournament entry.

 

(1) testing

 

for your move generation function, supply test cases and test rationale

test cases: for example, does your function respond gracefully to various kinds of improperly configured game states, or does it crash? Does your code come up with the moves it is supposed to, according to your design?

test rationale: what is the logic behind your choice of test cases... coverage of code? critical values?

(and test your code!)

you will probably need to write a test harness, a program that you use to call the code your are testing and give it the test cases

 

(2) use make to run your tests

 

make is a facility for automating compiling and running programs

 

there's a nice tutorial at             

http://www.eng.hawaii.edu/Tutor/Make/index.html

           

your makefile should be set up so that it is easy to modify either your test cases or your code and get an up-to-date test run

 

Here's an example makefile that runs the program pigtestex.exe on the test case data in the file testinput0.txt. It recompiles the program only if it has changed since the last test run. (Note: The version we first tried in class didn't have the .exe extensions on pigtestex.exe, and this didn't work properly, because the make facility needs to see exactly the right filename to avoid regenerating the file. So be sure you include the extensions.)

 

testresults: pigtestex.exe testinput0.txt

      pigtestex.exe

pigtestex.exe: pigtestex.c

      gcc -Wall pigtestex.c -o pigtestex.exe

 

Be sure to call the makefile makefile, and put it in the same directory with the source code and test case data file. To run the test, get in that directory and issue the command make.