package rebelsky.text; import java.io.PrintWriter; /** * A really naive test of simple text blocks. * */ public class TestSTB { public static void main(String[] args) throws Exception { PrintWriter pen = new PrintWriter(System.out, true); SimpleTextBlock stb = new SimpleTextBlock("A", "BB", "CCC"); SurroundedText st = new SurroundedText(stb); SurroundedText iSeeStars = new SurroundedText(st); for (int i = 0; i < stb.getLines(); i++) { pen.println(stb.getLine(i)); } // for for (int i = 0; i < st.getLines(); i++) { pen.println(st.getLine(i)); } // for for (int i = 0; i < iSeeStars.getLines(); i++) { pen.println(iSeeStars.getLine(i)); } // for } // main(String[]) } // class TestSTB