Removes the fake
target and adds 5 tests of directory tree inserts:
ascending
: files and subdirectories are added to each directory in ascending orderdescending
: files and subdirectories are added to each direction in descending orderexample
: the example tree from the spec (which was previously implemented by the fake
testlexicographic
: a depth-1 tree whose filenames are all the sequences with lengths between 1 and 5 consisting of a
, _
, and 0
. The files are inserted in random order.random
: inserts 1000 randomly generated paths with depths between 1 to 10; each file/subdirectory name is randomly generated with length between 1 and 4 consisting of x
, y
, and z
There is a bin/test_tree
program that runs a given test's input file, uses print_directory_tree()
to list the tree's entries, and create_directory_tree()
to write the tree to disk. Both of these are compared with their expected versions.