Testing depth first search