public void Indent() { pp = new PrettyPrinter(sw, 4); PrettyPrint("a$tb$oc$od$oe$of$og"); Assert.AreEqual("abcd" + nl + " ef" + nl + " g", sw.ToString()); }
public void LongStringWithOptionalBreaks() { pp = new PrettyPrinter(sw, 4); PrettyPrint("a$ob$oc$od$oe"); Assert.AreEqual("abcd" + nl + "e", sw.ToString()); }
public void ShortStringWithConnectedBreaks() { pp = new PrettyPrinter(sw, 4); PrettyPrint("a$cb"); Assert.AreEqual("ab", sw.ToString()); }
public void LongStringWithConnectedBreaks() { pp = new PrettyPrinter(sw, 4); PrettyPrint("a$cb$cc$cd$ce"); Assert.AreEqual("a" + nl + "b" + nl + "c" + nl + "d" + nl + "e", sw.ToString()); }
public void SmallString() { pp = new PrettyPrinter(sw, 4); PrettyPrint("hi"); Assert.AreEqual("hi", sw.ToString()); }