tests for TreeHasher.hash_leaves