示例#1
0
 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());
 }
示例#2
0
 public void LongStringWithOptionalBreaks()
 {
     pp = new PrettyPrinter(sw, 4);
     PrettyPrint("a$ob$oc$od$oe");
     Assert.AreEqual("abcd" + nl + "e", sw.ToString());
 }
示例#3
0
 public void ShortStringWithConnectedBreaks()
 {
     pp = new PrettyPrinter(sw, 4);
     PrettyPrint("a$cb");
     Assert.AreEqual("ab", sw.ToString());
 }
示例#4
0
 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());
 }
示例#5
0
 public void SmallString()
 {
     pp = new PrettyPrinter(sw, 4);
     PrettyPrint("hi");
     Assert.AreEqual("hi", sw.ToString());
 }