Don't output trailing spaces in Printer

Also don't output trailing empty lines in TestGenerator
This commit is contained in:
Alexander Udalov
2014-10-17 21:25:33 +04:00
parent 4d9ef1042d
commit bc9aa9e34f
4 changed files with 30 additions and 13 deletions
@@ -71,14 +71,18 @@ public class Printer {
if (withholdIndentOnce) {
withholdIndentOnce = false;
}
else {
append(indent);
else if (objects.length > 0) {
printIndent();
}
printWithNoIndent(objects);
return this;
}
public void printIndent() {
append(indent);
}
@NotNull
public Printer printWithNoIndent(Object... objects) {
for (Object object : objects) {