test transformation from/to recursive AST and `spec.ast.Tree`