Add CompilerTestCase::createASTPrinter.  I found the AST printing useful in a couple instances where code printing hid the differences.
@@ -1641,7 +1641,7 @@ public abstract class CompilerTestCase {
if (compareAsTree) {
if (compareJsDoc) {
assertNode(mainRoot)
- .usingSerializer(createPrettyPrinter(compiler))
+ .usingSerializer(createASTPrinter())
.isEqualIncludingJsDocTo(expectedRoot);
} else {
assertNode(mainRoot)
@@ -2323,4 +2323,8 @@ public abstract class CompilerTestCase {
.setPrettyPrint(true)
.build();
}
+
+ private static Function<Node, String> createASTPrinter() {
+ return Node::toStringTree;
+ }
}
