Home
last modified time | relevance | path

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

/libcore/luni/src/test/java/libcore/java/lang/
DStringBufferTest.java56 StringBuffer sb1 = new StringBuffer(); in testCompareTo() local
58 assertTrue(sb1.compareTo(sb2) < 0); in testCompareTo()
59 sb1.append("a"); in testCompareTo()
60 assertEquals(0, sb1.compareTo(sb2)); in testCompareTo()
64 assertTrue(sb1.compareTo(sb2) < 0); in testCompareTo()
65 sb1.append('\0'); in testCompareTo()
66 assertEquals(0, sb1.compareTo(sb2)); in testCompareTo()
67 assertEquals("a\0", sb1.toString()); in testCompareTo()
71 assertTrue(sb1.compareTo(sb2) < 0); in testCompareTo()
72 sb1.append('\u0161'); in testCompareTo()
[all …]
DStringBuilderTest.java166 StringBuilder sb1 = new StringBuilder(); in testCompareTo() local
168 assertTrue(sb1.compareTo(sb2) < 0); in testCompareTo()
169 sb1.append("a"); in testCompareTo()
170 assertEquals(0, sb1.compareTo(sb2)); in testCompareTo()
174 assertTrue(sb1.compareTo(sb2) < 0); in testCompareTo()
175 sb1.append('\0'); in testCompareTo()
176 assertEquals(0, sb1.compareTo(sb2)); in testCompareTo()
177 assertEquals("a\0", sb1.toString()); in testCompareTo()
181 assertTrue(sb1.compareTo(sb2) < 0); in testCompareTo()
182 sb1.append('\u0161'); in testCompareTo()
[all …]
/libcore/ojluni/src/test/java/lang/StringBuffer/
DAppendCharSequence.java51 StringBuffer sb1 = generateTestBuffer(0, 100); in bash() local
57 String s1 = sb1.toString(); in bash()
64 sb5.append((CharSequence)sb1); in bash()
65 s5 = sb1.toString(); in bash()
133 StringBuffer sb1 = new StringBuffer(); in checkNulls() local
135 sb1.append("test"); in checkNulls()
136 sb1.append(cs); in checkNulls()
137 if (!sb1.toString().equals("testnull")) in checkNulls()
140 sb1 = new StringBuffer(); in checkNulls()
141 sb1.append("test", 0, 2); in checkNulls()
[all …]
DTrim.java50 StringBuffer sb1 = generateTestBuffer(0, 100); in bash() local
51 StringBuffer sb2 = new StringBuffer(sb1); in bash()
52 sb1.trimToSize(); in bash()
53 if (!sb1.toString().equals(sb2.toString())) in bash()
58 sb1.append(sb3); in bash()
61 sb1.trimToSize(); in bash()
64 if (!sb1.toString().equals(sb2.toString())) in bash()
70 sb1.append(sb3); in bash()
73 sb1.trimToSize(); in bash()
76 if (!sb1.toString().equals(sb2.toString())) in bash()
DComparison.java76 StringBuffer sb1 = generateTestBuffer(65, 70, 97, 102); in testCompare() local
80 System.out.println(sb1.toString()); in testCompare()
83 Assert.assertTrue(sb1.compareTo(sb2) == 0, "Compare sb1 and sb2"); in testCompare()
84 Assert.assertFalse(sb1.compareTo(sb3) == 0, "Compare sb1 and sb3"); in testCompare()
93 StringBuffer sb1 = generateTestBuffer(65, 70, 97, 102); in testModifiedSequence() local
97 Assert.assertFalse(sb1.compareTo(sb2) == 0, "Compare the sequences before truncation"); in testModifiedSequence()
100 sb1.setLength(5); in testModifiedSequence()
103 System.out.println(sb1.toString()); in testModifiedSequence()
106 Assert.assertTrue(sb1.compareTo(sb2) == 0, "Compare sb1 and sb2"); in testModifiedSequence()
107 …Assert.assertTrue(sb1.toString().compareTo(sb2.toString()) == 0, "Compare strings of sb1 and sb2"); in testModifiedSequence()
DAppendStringBuilder.java42 StringBuilder sb1 = generateTestBuilder(10, 100); in main() local
45 String s1 = sb1.toString(); in main()
52 test.append(sb1); in main()
DAppendSB.java43 StringBuffer sb1 = generateTestBuffer(10, 100); in main() local
46 String s1 = sb1.toString(); in main()
53 test.append(sb1); in main()
DInsertMaxValue.java40 StringBuffer sb1 = new StringBuffer("Some test StringBuffer"); in main() local
52 sb1.insert(2, new char[25], 5, Integer.MAX_VALUE); in main()
/libcore/ojluni/src/test/java/lang/StringBuilder/
DComparison.java76 StringBuilder sb1 = generateTestBuffer(65, 70, 97, 102); in testCompare() local
80 System.out.println(sb1.toString()); in testCompare()
83 Assert.assertTrue(sb1.compareTo(sb2) == 0, "Compare sb1 and sb2"); in testCompare()
84 Assert.assertFalse(sb1.compareTo(sb3) == 0, "Compare sb1 and sb3"); in testCompare()
93 StringBuilder sb1 = generateTestBuffer(65, 70, 97, 102); in testModifiedSequence() local
97 Assert.assertFalse(sb1.compareTo(sb2) == 0, "Compare the sequences before truncation"); in testModifiedSequence()
100 sb1.setLength(5); in testModifiedSequence()
103 System.out.println(sb1.toString()); in testModifiedSequence()
106 Assert.assertTrue(sb1.compareTo(sb2) == 0, "Compare sb1 and sb2"); in testModifiedSequence()
107 …Assert.assertTrue(sb1.toString().compareTo(sb2.toString()) == 0, "Compare strings of sb1 and sb2"); in testModifiedSequence()
DAppendStringBuffer.java43 StringBuffer sb1 = generateTestBuffer(10, 100); in main() local
46 String s1 = sb1.toString(); in main()
53 test.append(sb1); in main()
/libcore/ojluni/src/test/java/util/HexFormat/
DHexFormatTest.java207 StringBuilder sb1 = hex.toHexDigits(sb, (byte)i); in testAppendHexByteWithStringBuilder() local
208 assertSame(sb1, sb, "toHexDigits returned different StringBuilder"); in testAppendHexByteWithStringBuilder()
/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/stream/
DTabulatorsTest.java343 …eJoining = Collector.of(StringBuilder::new, StringBuilder::append, (sb1, sb2) -> sb1.append(sb2.to…
DCollectorsTest.java422 …eJoining = Collector.of(StringBuilder::new, StringBuilder::append, (sb1, sb2) -> sb1.append(sb2.to…
/libcore/ojluni/src/test/java/util/stream/Collectors/
DCollectorsTest.java404 …eJoining = Collector.of(StringBuilder::new, StringBuilder::append, (sb1, sb2) -> sb1.append(sb2.to…