Contents of the functional test directory

The functional test directory, functest, includes the following subdirectories:
Table 1. Functional test subdirectories
Subdirectory Contains
data The .dat files for each opaque type, user-defined routine, and cast for which you entered test data. The name of the data file is objectname.dat, where objectname is either the name of the opaque type or the name of the C routine associated with a user-defined routine or cast.
opaque A subdirectory for each opaque type for which you entered test data. The subdirectory contains functional tests for the support routines defined for the opaque type.
udr A subdirectory containing functional tests for each user-defined routine for which you entered test data.
cast A subdirectory containing functional tests for each cast for which you entered test data.

The functest directory contains a master shell script, main.sh, for executing all of the functional tests generated for the DataBlade® module. Each subdirectory in the udr, opaque, and cast directories also contains a main.sh script to execute only the functional tests in that subdirectory.

The subdirectories in the udr, opaque, and cast directories contain various SQL scripts. Each subdirectory has a setup.sql script and a cleanup.sql script. The setup.sql script creates test tables and initializes them with test data. The cleanup.sql script drops all of the test tables from the database.

BladeSmith creates the following SQL test scripts for the object being tested:
  • call_pos.sql, for user-defined routines
  • call_neg.sql, for negative tests of user-defined routines
  • cast.sql, for casts
  • Additional scripts for opaque types to test the support routines defined for the type, as described in the following table
    Table 2. Additional scripts for opaque types
    Script names Support routines tested
    textio_pos.sql Text input/output functions for an opaque type; uses only valid test data.
    textio_neg.sql Text input/output functions for an opaque type; uses test data with invalid input data.
    binio.sql Binary file input/output functions; uses the valid input data for the opaque type.
    textexp.sql Text file import/export functions for opaque types; uses the UNLOAD and LOAD SQL statements.
    binexp.sql Binary file import/export functions for an opaque type; uses nested calls to the binary file import/export functions. The result of the nested calls are be equivalent to the text input format for the type.
    notify.sql The Assign()/Destroy() routines; inserts and deletes values in a new test table.
    compare.sql The Compare() function for an opaque type.
    equal.sql The Equal() function for an opaque type.
    notequal.sql The NotEqual() function for an opaque type.
    btree.sql, lessthan.sql, lessthanorequal.sql, greaterthan.sql, greaterthanorequal.sql B-tree support functions for an opaque type.
    plus.sql, minus.sql times.sql, divide.sql Standard math operators for an opaque type.
    positive.sql, negative.sql The Positive() and Negate() functions for an opaque type.
    concat.sql The concatenation operator; calls the Concat() function for an opaque data type with two instances of the type.
    hash.sql The Hash() support function with a SELECT...GROUP BY SQL query.

A script is generated only when the support routines it tests are defined.