Home
last modified time | relevance | path

Searched refs:sb2 (Results 1 – 20 of 20) sorted by relevance

/libcore/ojluni/src/test/java/lang/StringBuffer/
DTrim.java51 StringBuffer sb2 = new StringBuffer(sb1); in bash() local
53 if (!sb1.toString().equals(sb2.toString())) in bash()
59 sb2.append(sb3); in bash()
63 sb2.trimToSize(); in bash()
64 if (!sb1.toString().equals(sb2.toString())) in bash()
71 sb2.append(sb3); in bash()
75 sb2.trimToSize(); in bash()
76 if (!sb1.toString().equals(sb2.toString())) in bash()
94 StringBuffer sb2 = generateTestBuffer(sizeNeeded, sizeNeeded); in capacityCheck() local
95 if (sb2.length() != sizeNeeded) in capacityCheck()
[all …]
DComparison.java77 StringBuffer sb2 = generateTestBuffer(65, 70, 97, 102); in testCompare() local
81 System.out.println(sb2.toString()); in testCompare()
83 Assert.assertTrue(sb1.compareTo(sb2) == 0, "Compare sb1 and sb2"); in testCompare()
94 StringBuffer sb2 = generateTestBuffer(65, 70, 98, 103); in testModifiedSequence() local
97 Assert.assertFalse(sb1.compareTo(sb2) == 0, "Compare the sequences before truncation"); in testModifiedSequence()
101 sb2.setLength(5); in testModifiedSequence()
104 System.out.println(sb2.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()
DAppendCharSequence.java52 StringBuffer sb2 = generateTestBuffer(0, 100); in bash() local
58 String s2 = sb2.toString(); in bash()
73 while (index > sb2.length() - len) { in bash()
77 sb5.append((CharSequence)sb2, index, index + len); in bash()
78 s5 = s5 + sb2.toString().substring(index, index + len); in bash()
234 StringBuffer sb2 = new StringBuffer(cs); in checkConstructor() local
235 if (!sb.toString().equals(sb2.toString())) { in checkConstructor()
DAppendSB.java44 StringBuffer sb2 = generateTestBuffer(10, 100); in main() local
47 String s2 = sb2.toString(); in main()
54 test.append(sb2); in main()
DAppendStringBuilder.java43 StringBuilder sb2 = generateTestBuilder(10, 100); in main() local
46 String s2 = sb2.toString(); in main()
53 test.append(sb2); in main()
/libcore/luni/src/test/java/libcore/java/lang/
DStringBufferTest.java57 StringBuffer sb2 = new StringBuffer("a"); in testCompareTo() local
58 assertTrue(sb1.compareTo(sb2) < 0); in testCompareTo()
60 assertEquals(0, sb1.compareTo(sb2)); in testCompareTo()
63 sb2.append('\0'); in testCompareTo()
64 assertTrue(sb1.compareTo(sb2) < 0); in testCompareTo()
66 assertEquals(0, sb1.compareTo(sb2)); in testCompareTo()
70 sb2.append('\u0161'); in testCompareTo()
71 assertTrue(sb1.compareTo(sb2) < 0); in testCompareTo()
73 assertEquals(0, sb1.compareTo(sb2)); in testCompareTo()
DStringBuilderTest.java118 StringBuilder sb2 = new StringBuilder(); in test_delete_boundsChecks() local
119 sb2.delete(0, sb2.length()); in test_delete_boundsChecks()
120 sb2.delete(0, 12); in test_delete_boundsChecks()
167 StringBuilder sb2 = new StringBuilder("a"); in testCompareTo() local
168 assertTrue(sb1.compareTo(sb2) < 0); in testCompareTo()
170 assertEquals(0, sb1.compareTo(sb2)); in testCompareTo()
173 sb2.append('\0'); in testCompareTo()
174 assertTrue(sb1.compareTo(sb2) < 0); in testCompareTo()
176 assertEquals(0, sb1.compareTo(sb2)); in testCompareTo()
180 sb2.append('\u0161'); in testCompareTo()
[all …]
/libcore/ojluni/src/test/java/lang/StringBuilder/
DComparison.java77 StringBuilder sb2 = generateTestBuffer(65, 70, 97, 102); in testCompare() local
81 System.out.println(sb2.toString()); in testCompare()
83 Assert.assertTrue(sb1.compareTo(sb2) == 0, "Compare sb1 and sb2"); in testCompare()
94 StringBuilder sb2 = generateTestBuffer(65, 70, 98, 103); in testModifiedSequence() local
97 Assert.assertFalse(sb1.compareTo(sb2) == 0, "Compare the sequences before truncation"); in testModifiedSequence()
101 sb2.setLength(5); in testModifiedSequence()
104 System.out.println(sb2.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.java44 StringBuffer sb2 = generateTestBuffer(10, 100); in main() local
47 String s2 = sb2.toString(); in main()
54 test.append(sb2); in main()
/libcore/ojluni/src/test/java/nio/Buffer/
DBasicLong.java810 LongBuffer sb2 = sb.slice(); in test() local
811 checkSlice(sb, sb2); in test()
813 if (!sb.equals(sb2)) in test()
814 fail("Sliced slices do not match", sb, sb2); in test()
815 if ((sb.hasArray()) && (sb.arrayOffset() != sb2.arrayOffset())) { in test()
817 + sb.arrayOffset() + " != " + sb2.arrayOffset(), sb, sb2); in test()
DBasicInt.java810 IntBuffer sb2 = sb.slice(); in test() local
811 checkSlice(sb, sb2); in test()
813 if (!sb.equals(sb2)) in test()
814 fail("Sliced slices do not match", sb, sb2); in test()
815 if ((sb.hasArray()) && (sb.arrayOffset() != sb2.arrayOffset())) { in test()
817 + sb.arrayOffset() + " != " + sb2.arrayOffset(), sb, sb2); in test()
DBasicShort.java810 ShortBuffer sb2 = sb.slice(); in test() local
811 checkSlice(sb, sb2); in test()
813 if (!sb.equals(sb2)) in test()
814 fail("Sliced slices do not match", sb, sb2); in test()
815 if ((sb.hasArray()) && (sb.arrayOffset() != sb2.arrayOffset())) { in test()
817 + sb.arrayOffset() + " != " + sb2.arrayOffset(), sb, sb2); in test()
DBasicFloat.java810 FloatBuffer sb2 = sb.slice(); in test() local
811 checkSlice(sb, sb2); in test()
813 if (!sb.equals(sb2)) in test()
814 fail("Sliced slices do not match", sb, sb2); in test()
815 if ((sb.hasArray()) && (sb.arrayOffset() != sb2.arrayOffset())) { in test()
817 + sb.arrayOffset() + " != " + sb2.arrayOffset(), sb, sb2); in test()
DBasicDouble.java810 DoubleBuffer sb2 = sb.slice(); in test() local
811 checkSlice(sb, sb2); in test()
813 if (!sb.equals(sb2)) in test()
814 fail("Sliced slices do not match", sb, sb2); in test()
815 if ((sb.hasArray()) && (sb.arrayOffset() != sb2.arrayOffset())) { in test()
817 + sb.arrayOffset() + " != " + sb2.arrayOffset(), sb, sb2); in test()
DBasicChar.java810 CharBuffer sb2 = sb.slice(); in test() local
811 checkSlice(sb, sb2); in test()
813 if (!sb.equals(sb2)) in test()
814 fail("Sliced slices do not match", sb, sb2); in test()
815 if ((sb.hasArray()) && (sb.arrayOffset() != sb2.arrayOffset())) { in test()
817 + sb.arrayOffset() + " != " + sb2.arrayOffset(), sb, sb2); in test()
DBasicByte.java810 ByteBuffer sb2 = sb.slice(); in test() local
811 checkSlice(sb, sb2); in test()
813 if (!sb.equals(sb2)) in test()
814 fail("Sliced slices do not match", sb, sb2); in test()
815 if ((sb.hasArray()) && (sb.arrayOffset() != sb2.arrayOffset())) { in test()
817 + sb.arrayOffset() + " != " + sb2.arrayOffset(), sb, sb2); in test()
DBasic-X.java.template810 $Type$Buffer sb2 = sb.slice();
811 checkSlice(sb, sb2);
813 if (!sb.equals(sb2))
814 fail("Sliced slices do not match", sb, sb2);
815 if ((sb.hasArray()) && (sb.arrayOffset() != sb2.arrayOffset())) {
817 + sb.arrayOffset() + " != " + sb2.arrayOffset(), sb, sb2);
/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/stream/
DTabulatorsTest.java343 … = Collector.of(StringBuilder::new, StringBuilder::append, (sb1, sb2) -> sb1.append(sb2.toString()…
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/
DFileTest.java1747 StringBuilder sb2 = new StringBuilder(dir + File.separator); in test_mkdir() local
1767 dir = new File(sb2.toString()); in test_mkdir()
1770 sb2.append(0); in test_mkdir()
1771 dir = new File(sb2.toString()); in test_mkdir()
/libcore/ojluni/src/test/java/util/stream/Collectors/
DCollectorsTest.java402 … = Collector.of(StringBuilder::new, StringBuilder::append, (sb1, sb2) -> sb1.append(sb2.toString()…