# Run this TCL script to generate thousands of test cases containing
# complicated expressions.
#
# The generated tests are intended to verify expression evaluation
# in SQLite against expression evaluation TCL.
#
# Terms of the $intexpr list each contain two sub-terms.
#
# * An SQL expression template
# * The equivalent TCL expression
#
# EXPR is replaced by an integer subexpression. BOOL is replaced
# by a boolean subexpression.
#
set intexpr
# The $boolexpr list contains terms that show both an SQL boolean
# expression and its equivalent TCL.
#
set boolexpr
# Aggregate expressions
#
set aggexpr
# Convert a string containing EXPR, AGG, and BOOL into a string
# that contains nothing but X, Y, and Z.
#
# Test all templates to make sure the number of EXPR, AGG, and BOOL
# expressions match.
#
foreach term
# Generate a random expression according to the templates given above.
# If the argument is EXPR or omitted, then an integer expression is
# generated. If the argument is BOOL then a boolean expression is
# produced.
#
# Implementation of routines used to implement the IN and BETWEEN
# operators.
# Begin generating the test script:
#
puts
# Test data for TCL evaluation.
#
set a
set b
set c
set d
set e
set f
# A procedure to generate a test case.
#
set tn 0
# Generate many random test cases.
#
expr srand(0)
for
# Terminate the test script
#
puts