@Test
public void testPrintln() {

	StringWriter stringWriter = new StringWriter();
	UnsyncPrintWriter unsyncPrintWriter = new UnsyncPrintWriter(
		stringWriter);
	unsyncPrintWriter.println();
	String lineSeparator = System.getProperty("line.separator");
	Assert.assertEquals(lineSeparator, stringWriter.toString());
	StringBuffer stringBuffer = stringWriter.getBuffer();
	stringBuffer.setLength(0);
	unsyncPrintWriter.println(true);
	Assert.assertEquals("true" + lineSeparator, stringWriter.toString());
	stringBuffer.setLength(0);
	unsyncPrintWriter.println(false);
	Assert.assertEquals("false" + lineSeparator, stringWriter.toString());
	stringBuffer.setLength(0);
	unsyncPrintWriter.println('c');
	Assert.assertEquals("c" + lineSeparator, stringWriter.toString());
	stringBuffer.setLength(0);
	unsyncPrintWriter.println(new char[] {'a', 'b', 'c'});
	Assert.assertEquals("abc" + lineSeparator, stringWriter.toString());
	stringBuffer.setLength(0);
	unsyncPrintWriter.println(3.14D);
	Assert.assertEquals("3.14" + lineSeparator, stringWriter.toString());
	stringBuffer.setLength(0);
	unsyncPrintWriter.println(1.62F);
	Assert.assertEquals("1.62" + lineSeparator, stringWriter.toString());
	stringBuffer.setLength(0);
	unsyncPrintWriter.println(10);
	Assert.assertEquals("10" + lineSeparator, stringWriter.toString());
	stringBuffer.setLength(0);
	unsyncPrintWriter.println(100L);
	Assert.assertEquals("100" + lineSeparator, stringWriter.toString());
	stringBuffer.setLength(0);
	unsyncPrintWriter.println(
		new Object() {
			@Override
			public String toString() {
				return "test";
			}
		});
	Assert.assertEquals("test" + lineSeparator, stringWriter.toString());
	stringBuffer.setLength(0);
	unsyncPrintWriter.println((String)null);
	Assert.assertEquals("null" + lineSeparator, stringWriter.toString());
	stringBuffer.setLength(0);
	unsyncPrintWriter.println("テスト");
	Assert.assertEquals("テスト" + lineSeparator, stringWriter.toString());
	unsyncPrintWriter.close();
	unsyncPrintWriter.println();
	Assert.assertTrue(unsyncPrintWriter.checkError());
}