Site Search
Send Mail Feedback
Site Outline
Site Support

 ISDK SupportSamplesTests


Using the ISDK API Test Suite

Porting the Test Suite to your system

In order to compile any of the tests, you must first link them with a ScriptEase Interpreter Engine library file. The exact steps will vary with the compiler you are using. Your compiler choice and whether or not your target operating system supports DLLs will probably dictate your library file choice. For instance use the library file, sew32l.lib (located in the LIBS\WIN32\LIB\MSVC40 directory) if you are using Visual C++ on the Windows '95 platform and want to use a static library. There are also two directories of headers you need to make available to the compiler: \seisdk\incjse and \seisdk\srcmisc.

The second step is to edit the jseopt.h file, which is included in all of the tests. The jseopt.h file is designed to allow you to configure the SE:ISDK to fit the particulars of your platform and specify the options you choose to use. There are two #defines you will need to configure in order to successfuly run the tests. The first is your target operating system, which takes the form __JSE_XXXXX__ where XXXXX is the platform you are targeting. Refer to chapter 1 of the manual for a list of these #defines. The second #define will be one of the following: __JSE_LIB__ if you choose to use the static library version of the interpreter engine, __JSE_DLLLOAD__ if you choose the load-time DLL version, or __JSE_DLLRUN__ if you choose the run-time DLL version.

The third step is to edit the jsetest.c file, which is also included in all of the tests. The jsetest.c file holds all of the common code for the tests, which allows you to change the behavior of all the tests in one place. There are two specific functions which you may need to configure in order to suit your system:

  • Output is handled in the jseTestPrintf() function. The default behavior of this function is print to standard output using printf(). If you wish to change the method for output, alter the body of this function in a way that suits your needs. If you do not want output, then take out the body of this function and leave it blank.
     

  • Test failure is handled in the jseTestAssert() function. The default behavior of a failed assert is print out an error message using jseTestPrintf() and then terminate the program with a call to exit( EXIT_FAILURE );. You should change the method of termination to work with your system.

Once you have configured the jseopt.h and jsetest.c files, you are all ready to run the tests. Just chose the test you wish to run and then compile and link it. The test will report success or failure depending on how you configured the jsetest.c file.