Add unit tests for compute_visit_tree and verfiy reversed curved.