Depth of tree with tests