* Test that docs print properly
*/
@Test
public void testDoc() {
// empty doc
assertEquals("", print(new Doc("PrinterTest", EMPTY_PKG, NO_IMPORTS, Util.<DataType> list())));
// package
assertEquals("package some.package\n\n",
print(new Doc("PrinterTest", Pkg._Pkg(NO_COMMENTS, "some.package"), NO_IMPORTS, Util.<DataType> list())));
// imports
assertEquals("import number.one\nimport number.two\n\n",
print(new Doc("PrinterTest", EMPTY_PKG, list(Imprt._Imprt(NO_COMMENTS, "number.one"), Imprt._Imprt(NO_COMMENTS,"number.two")), Util.<DataType> list())));
// package and imports
assertEquals("package some.package\n\nimport number.one\nimport number.two\n\n", print(new Doc(
"PrinterTest", Pkg._Pkg(NO_COMMENTS, "some.package"), list(Imprt._Imprt(NO_COMMENTS, "number.one"), Imprt._Imprt(NO_COMMENTS,"number.two")), Util.<DataType> list())));
// package, imports and datatypes
assertEquals("package some.package\n\nimport number.one\nimport number.two\n\nFoo =\n Bar\n", print(new Doc(
"PrinterTest", Pkg._Pkg(NO_COMMENTS, "some.package"), list(Imprt._Imprt(NO_COMMENTS, "number.one"), Imprt._Imprt(NO_COMMENTS,"number.two")), list(new DataType(NO_COMMENTS, NO_ANNOTATIONS, "Foo", Util.<String>list(), NO_EXTENDS, NO_IMPLEMENTS,
list(new Constructor(NO_COMMENTS, "Bar", Util.<Arg> list())))))));
}