Test file for binary search functions

Each test looks something like this:
Problem 1
in [
]? no
Of lines 1 through 5+n of a given test,
Each line is in Unix style, ended with newline ( '\x0A' ).
Line 1 is the name of the problem.
Line 2 is a signed integer, T
Line 3 is the string "in ["
Line 4+i, where 0 <= i < n, is A[ i ], an int.
Line 4+n is either "]? yes" or "]? no" Line 5+n is a blank line.

There are 4096 tests, with arrays ranging up to about 512 elements, although the average is about 16 elements. The correct answer is "yes" in about half of the examples. Unzipped, tests.txt is 680k.

follow_tests.py_txt (4K) Python to run the tests, includes binary_search.
tests.txt.gz (86K) the test data, gzipped
tests.zip (86K) the test data, zipped
write_tests.py_txt (2K) Python that generates the test file.

(The php and py scripts are named *.php_txt and *.py_txt so my web host doesn't confuse them with CGI scripts.)

This page was made with a php script. Last change 2021-01-15 20:44:45 EST
--Steve Witham Up to my home page.