Home
last modified time | relevance | path

Searched refs:sw (Results 1 – 14 of 14) sorted by relevance

/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/
DStringWriterTest.java25 StringWriter sw; field in StringWriterTest
41 sw.close(); in test_close()
52 sw.flush(); in test_flush()
53 sw.write('c'); in test_flush()
54 assertEquals("Failed to flush char", "c", sw.toString()); in test_flush()
64 sw.write("This is a test string"); in test_getBuffer()
65 StringBuffer sb = sw.getBuffer(); in test_getBuffer()
75 sw.write("This is a test string"); in test_toString()
77 "This is a test string", sw.toString()); in test_toString()
87 sw.write(c, 0, 21); in test_write$CII()
[all …]
DBufferedWriterTest.java32 Support_StringWriter sw; field in BufferedWriterTest
40 sw = new Support_StringWriter(); in test_ConstructorLjava_io_Writer()
41 bw = new BufferedWriter(sw); in test_ConstructorLjava_io_Writer()
42 sw.write("Hi"); in test_ConstructorLjava_io_Writer()
43 assertEquals("Constructor failed", "Hi", sw.toString()); in test_ConstructorLjava_io_Writer()
91 assertTrue("Write after close", !sw.toString().equals(testString)); in test_close()
123 assertTrue("Bytes written without flush", sw.toString().equals("")); in test_flush()
125 assertEquals("Bytes not flushed", "This should not cause a flush", sw in test_flush()
138 assertTrue("Incorrect string written: " + sw.toString(), sw.toString() in test_newLine()
149 assertTrue("Incorrect string written", sw.toString().equals( in test_write$CII()
[all …]
DCharArrayWriterTest.java173 StringWriter sw = new StringWriter(); in test_writeToLjava_io_Writer() local
174 cw.writeTo(sw); in test_writeToLjava_io_Writer()
175 assertEquals("Writer failed to write correct chars", "HelloWorld", sw in test_writeToLjava_io_Writer()
DPrintWriterTest.java120 Support_StringWriter sw; in test_ConstructorLjava_io_Writer() local
121 pw = new PrintWriter(sw = new Support_StringWriter()); in test_ConstructorLjava_io_Writer()
125 "Hello", sw.toString()); in test_ConstructorLjava_io_Writer()
133 Support_StringWriter sw; in test_ConstructorLjava_io_WriterZ() local
134 pw = new PrintWriter(sw = new Support_StringWriter(), true); in test_ConstructorLjava_io_WriterZ()
138 "Hello", sw.toString()); in test_ConstructorLjava_io_WriterZ()
/libcore/luni/src/test/java/libcore/java/io/
DOldBufferedWriterTest.java30 Support_StringWriter sw; field in OldBufferedWriterTest
37 bw = new BufferedWriter(sw); in test_ConstructorLjava_io_Writer()
40 assertTrue("Test 1: Buffering failed.", sw.toString().equals("")); in test_ConstructorLjava_io_Writer()
42 assertEquals("Test 2: Incorrect value;", "Hi", sw.toString()); in test_ConstructorLjava_io_Writer()
50 bw = new BufferedWriter(sw, 0); in test_ConstructorLjava_io_WriterI()
56 bw = new BufferedWriter(sw, 10); in test_ConstructorLjava_io_WriterI()
59 assertTrue("Test 2: Buffering failed.", sw.toString().equals("")); in test_ConstructorLjava_io_WriterI()
61 assertEquals("Test 3: Incorrect value;", "Hi", sw.toString()); in test_ConstructorLjava_io_WriterI()
76 assertFalse("Test 2: Write after close.", sw.toString().equals(testString)); in test_close()
90 sw.toString().equals("")); in test_flush()
[all …]
DOldStringWriterTest.java25 StringWriter sw; field in OldStringWriterTest
45 sw = new StringWriter(); in setUp()
DOldCharArrayWriterTest.java76 StringWriter sw = new StringWriter(); in test_writeToLjava_io_Writer() local
78 cw.writeTo(sw); in test_writeToLjava_io_Writer()
80 "HelloWorld", sw.toString()); in test_writeToLjava_io_Writer()
/libcore/support/src/test/java/org/apache/harmony/security/tests/support/cert/
DMyCertPathValidatorSpi.java39 private int sw = 0; field in MyCertPathValidatorSpi
43 ++sw; in engineValidate()
45 if ((sw % 2) == 0) { in engineValidate()
50 if ((sw % 3) == 0) { in engineValidate()
/libcore/ojluni/src/main/java/java/util/logging/
DSimpleFormatter.java154 StringWriter sw = new StringWriter(); in format() local
155 PrintWriter pw = new PrintWriter(sw); in format()
159 throwable = sw.toString(); in format()
/libcore/luni/src/test/java/libcore/java/lang/
DSystemTest.java54 StringWriter sw = new StringWriter(); in testLineSeparator() local
55 BufferedWriter bw = new BufferedWriter(sw); in testLineSeparator()
58 assertEquals(System.lineSeparator(), sw.toString()); in testLineSeparator()
66 sw = new StringWriter(); in testLineSeparator()
67 new PrintWriter(sw).println(); in testLineSeparator()
68 assertEquals(System.lineSeparator(), sw.toString()); in testLineSeparator()
/libcore/ojluni/src/main/java/sun/util/logging/
DPlatformLogger.java526 StringWriter sw = new StringWriter(); in format() local
527 PrintWriter pw = new PrintWriter(sw); in format()
531 throwable = sw.toString(); in format()
/libcore/ojluni/src/main/java/java/lang/invoke/
DMethodType.java945 Wrapper sw = Wrapper.forPrimitiveType(src); in canConvert()
948 return Wrapper.forPrimitiveType(dst).isConvertibleFrom(sw); in canConvert()
951 return dst.isAssignableFrom(sw.wrapperType()); in canConvert()
/libcore/ojluni/src/test/java/util/stream/bootlib/java/util/stream/
DOpTestCase.java425 StringWriter sw = new StringWriter(); in exercise() local
426 PrintWriter pw = new PrintWriter(sw); in exercise()
430 sb.append(t).append("\n").append(sw); in exercise()
/libcore/ojluni/src/test/java/util/stream/testlib/org/openjdk/testlib/java/util/stream/
DOpTestCase.java426 StringWriter sw = new StringWriter(); in exercise() local
427 PrintWriter pw = new PrintWriter(sw); in exercise()
431 sb.append(t).append("\n").append(sw); in exercise()