/libcore/ojluni/src/test/java/lang/StringBuffer/ |
D | CompactStringBuffer.java | 54 check(new StringBuffer(ORIGIN).append(new char[] { '\uFF21' }), in testCompactStringBufferForLatinA() 56 check(new StringBuffer(ORIGIN).append(new StringBuffer("\uFF21")), in testCompactStringBufferForLatinA() 58 check(new StringBuffer(ORIGIN).append("\uFF21"), "A\uFF21"); in testCompactStringBufferForLatinA() 59 check(new StringBuffer(ORIGIN).append(new StringBuffer("\uFF21")), in testCompactStringBufferForLatinA() 61 check(new StringBuffer(ORIGIN).delete(0, 1), ""); in testCompactStringBufferForLatinA() 62 check(new StringBuffer(ORIGIN).delete(0, 0), "A"); in testCompactStringBufferForLatinA() 63 check(new StringBuffer(ORIGIN).deleteCharAt(0), ""); in testCompactStringBufferForLatinA() 71 check(new StringBuffer(ORIGIN).insert(0, new char[] {}), "A"); in testCompactStringBufferForLatinA() 72 check(new StringBuffer(ORIGIN).insert(1, new char[] { '\uFF21' }), in testCompactStringBufferForLatinA() 74 check(new StringBuffer(ORIGIN).insert(0, new char[] { '\uFF21' }), in testCompactStringBufferForLatinA() [all …]
|
D | Supplementary.java | 184 check(!golden3[i].equals(new String(sb)), in test3() 192 check(!testdata1[i][1].equals(new String(sb)), in test3() 209 check(sb != rsb, "appendCodePoint returned a wrong object"); in test4() 211 check(sbc != c, "appendCodePoint(j) != c", sbc, c); in test4() 213 check(!s.equals(sb.toString()), in test4() 237 check(result != expected, "codePointCount(input["+i+"], "+j+", "+length+")", in test5() 243 check(result != expected, "codePointCount(input["+i+"], 0, "+j+")", in test5() 270 check(result != length, in test6() 281 check(result != expected, in test6() 295 check(result != expected, in test6() [all …]
|
/libcore/ojluni/src/test/java/lang/StringBuilder/ |
D | CompactStringBuilder.java | 54 check(new StringBuilder(ORIGIN).append(new char[] { '\uFF21' }), in testCompactStringBuilderForLatinA() 56 check(new StringBuilder(ORIGIN).append(new StringBuffer("\uFF21")), in testCompactStringBuilderForLatinA() 58 check(new StringBuilder(ORIGIN).append("\uFF21"), "A\uFF21"); in testCompactStringBuilderForLatinA() 59 check(new StringBuilder(ORIGIN).append(new StringBuffer("\uFF21")), in testCompactStringBuilderForLatinA() 61 check(new StringBuilder(ORIGIN).delete(0, 1), ""); in testCompactStringBuilderForLatinA() 62 check(new StringBuilder(ORIGIN).delete(0, 0), "A"); in testCompactStringBuilderForLatinA() 63 check(new StringBuilder(ORIGIN).deleteCharAt(0), ""); in testCompactStringBuilderForLatinA() 71 check(new StringBuilder(ORIGIN).insert(0, new char[] {}), "A"); in testCompactStringBuilderForLatinA() 72 check(new StringBuilder(ORIGIN).insert(1, new char[] { '\uFF21' }), in testCompactStringBuilderForLatinA() 74 check(new StringBuilder(ORIGIN).insert(0, new char[] { '\uFF21' }), in testCompactStringBuilderForLatinA() [all …]
|
D | Supplementary.java | 186 check(!golden3[i].equals(sb.toString()), in test3() 194 check(!testdata1[i][1].equals(sb.toString()), in test3() 211 check(sb != rsb, "appendCodePoint returned a wrong object"); in test4() 213 check(sbc != c, "appendCodePoint("+j+") != c", sbc, c); in test4() 215 check(!s.equals(sb.toString()), in test4() 239 check(result != expected, "codePointCount(input["+i+"], "+j+", "+length+")", in test5() 245 check(result != expected, "codePointCount(input["+i+"], 0, "+j+")", in test5() 272 check(result != length, in test6() 283 check(result != expected, in test6() 297 check(result != expected, in test6() [all …]
|
/libcore/ojluni/src/test/java/util/Collections/ |
D | NCopies.java | 56 static void check(boolean condition, String msg) { in check() method in NCopies 63 static void check(boolean condition) { in check() method in NCopies 64 check(condition, "Assertion failure"); in check() 68 check(x.isEmpty()); in checkEmpty() 69 check(x.size() == 0); in checkEmpty() 70 check(x.indexOf("foo") == -1); in checkEmpty() 71 check(x.lastIndexOf("foo") == -1); in checkEmpty() 72 check(x.toArray().length == 0); in checkEmpty() 73 check(x.toArray().getClass() == Object[].class); in checkEmpty() 77 check(! x.isEmpty()); in checkFoos() [all …]
|
D | CheckedNull.java | 87 check(! c.contains(o)); in add() 88 check(c.add(o)); in add() 89 check(c.contains(o)); in add() 91 check(c.remove(o)); in add() 92 check(! c.contains(o)); in add() 93 check(c.addAll(singleton(o))); in add() 94 check(c.contains(o)); in add() 96 check(c.remove(o)); in add() 102 check(c.isEmpty()); in testCollection() 106 check(c.add("bar")); in testCollection() [all …]
|
D | EmptyIterator.java | 76 check(e == emptyEnumeration()); in testEmptyEnumeration() 77 check(!e.hasMoreElements()); in testEmptyEnumeration() 83 check(it == emptyIterator()); in testEmptyIterator() 84 check(! it.hasNext()); in testEmptyIterator() 92 check(m == emptyMap()); in testEmptyMap() 93 check(m.entrySet().iterator() == in testEmptyMap() 95 check(m.values().iterator() == emptyIterator()); in testEmptyMap() 96 check(m.keySet().iterator() == emptyIterator()); in testEmptyMap() 113 check(c.toArray(t) == t); in testToArray() 118 check(c.toArray(t) == t); in testToArray() [all …]
|
D | AsLifoQueue.java | 41 check(deq.addAll(Arrays.asList("b", "a", "c"))); in realMain() 43 check(deq.add("d")); in realMain() 46 check(q.add("e")); in realMain() 54 check(q.isEmpty()); equal(q.size(), 0); in realMain() 55 check(q.add("a")); check(! q.isEmpty()); equal(q.size(), 1); in realMain() 56 check(q.offer("b")); in realMain() 57 check(q.add("c")); in realMain() 59 check(! q.offer("d")); in realMain() 72 check(q.isEmpty()); in realMain() 85 static void check(boolean cond) {if (cond) pass(); else fail();} in check() method in AsLifoQueue
|
D | SetFromMap.java | 43 static void check(boolean cond) { if (cond) pass(); else fail(); } in check() method in SetFromMap 62 check(s.add(foo1)); in realMain() 63 check(s.add(foo2)); in realMain() 64 check(s.add(bar)); in realMain() 66 check(s.contains(foo1)); in realMain() 67 check(s.contains(foo2)); in realMain() 68 check(! s.contains(new String(foo1))); in realMain()
|
/libcore/ojluni/src/test/java/nio/file/attribute/ |
D | BasicFileAttributeViewTest.java | 45 static void check(boolean okay, String msg) { in check() method in BasicFileAttributeViewTest 54 check(attrs.isDirectory(), "is a directory"); in checkAttributesOfDirectory() 55 check(!attrs.isRegularFile(), "is not a regular file"); in checkAttributesOfDirectory() 56 check(!attrs.isSymbolicLink(), "is not a link"); in checkAttributesOfDirectory() 57 check(!attrs.isOther(), "is not other"); in checkAttributesOfDirectory() 61 check(f.lastModified()/1000 == attrs.lastModifiedTime().to(TimeUnit.SECONDS), in checkAttributesOfDirectory() 69 check(attrs.isRegularFile(), "is a regular file"); in checkAttributesOfFile() 70 check(!attrs.isDirectory(), "is not a directory"); in checkAttributesOfFile() 71 check(!attrs.isSymbolicLink(), "is not a link"); in checkAttributesOfFile() 72 check(!attrs.isOther(), "is not other"); in checkAttributesOfFile() [all …]
|
/libcore/ojluni/src/test/java/lang/String/concat/ |
D | ImplicitStringConcatAssignLHS.java | 113 check(1, "plain-plain Object[]"); in testImplicitStringConcatAssignLHS() 119 check(2, "method-plain Object[]"); in testImplicitStringConcatAssignLHS() 125 check(2, "method-method Object[]"); in testImplicitStringConcatAssignLHS() 132 check(1, "plain-plain String[]"); in testImplicitStringConcatAssignLHS() 138 check(2, "method-plain String[]"); in testImplicitStringConcatAssignLHS() 144 check(2, "method-method String[]"); in testImplicitStringConcatAssignLHS() 151 check(1, "plain-plain CharSequence[]"); in testImplicitStringConcatAssignLHS() 157 check(2, "method-plain CharSequence[]"); in testImplicitStringConcatAssignLHS() 163 check(2, "method-method CharSequence[]"); in testImplicitStringConcatAssignLHS() 169 check(1, "MyClass::new (String)"); in testImplicitStringConcatAssignLHS() [all …]
|
/libcore/ojluni/src/test/java/util/Collection/ |
D | MOAT.java | 402 check(c.containsAll(c)); in checkContainsSelf() 403 check(c.containsAll(Arrays.asList(c.toArray()))); in checkContainsSelf() 404 check(c.containsAll(Arrays.asList(c.toArray(new Integer[0])))); in checkContainsSelf() 408 check(c.containsAll(new ArrayList<Integer>())); in checkContainsEmpty() 418 check(count == 1); in checkUnique() 423 check(c.isEmpty()); in testEmptyCollection() 429 check(c.toArray(new Object[]{42})[0] == null); in testEmptyCollection() 439 check(! it.hasNext()); in testEmptyIterator() 449 check(! it.hasNext()); in testEmptyIterator() 595 check(m.isEmpty()); in testEmptyMap() [all …]
|
/libcore/ojluni/src/test/java/text/Format/NumberFormat/ |
D | BigDecimalParse.java | 121 check(nonsep_int + "." + fra, new BigDecimal(nonsep_int + "." + fra)); in test_Parse_in_DecimalFormat_BigDecimal() 125 check("-" + sep_int + "." + fra, in test_Parse_in_DecimalFormat_BigDecimal() 130 check(nonsep_zero + "." + nonsep_zero, in test_Parse_in_DecimalFormat_BigDecimal() 135 check("0.0000000000" + nonsep_zero + fra + "E370", in test_Parse_in_DecimalFormat_BigDecimal() 140 check("0.1" + nonsep_int + "E-360", in test_Parse_in_DecimalFormat_BigDecimal() 145 check(nonsep_zero + "." + nonsep_zero + nonsep_int, in test_Parse_in_DecimalFormat_BigDecimal() 150 check("0." + nonsep_int + "E360", in test_Parse_in_DecimalFormat_BigDecimal() 164 check("250,000,000," + sep_zero + "." + nonsep_zero, in test_Parse_in_DecimalFormat_BigDecimal_usingMultiplier() 169 check("-250,000,000," + sep_zero + "." + nonsep_zero, in test_Parse_in_DecimalFormat_BigDecimal_usingMultiplier() 175 check("250,000,000," + sep_zero + "." + nonsep_zero, in test_Parse_in_DecimalFormat_BigDecimal_usingMultiplier() [all …]
|
/libcore/ojluni/src/test/java/lang/Float/ |
D | ParseFloatTest.java | 45 private static void check(String val) { in check() method in ParseFloatTest 123 private static void check(String val, float expected) { in check() method in ParseFloatTest 127 check(val); in check() 132 check(new String(""+Float.MIN_VALUE), Float.MIN_VALUE); in rudimentaryTest() 133 check(new String(""+Float.MAX_VALUE), Float.MAX_VALUE); in rudimentaryTest() 135 check("10", (float) 10.0); in rudimentaryTest() 136 check("10.0", (float) 10.0); in rudimentaryTest() 137 check("10.01", (float) 10.01); in rudimentaryTest() 139 check("-10", (float) -10.0); in rudimentaryTest() 140 check("-10.00", (float) -10.0); in rudimentaryTest() [all …]
|
/libcore/ojluni/src/test/java/lang/Integer/ |
D | ParsingTest.java | 67 check(+100, "+100"); in main() 68 check(-100, "-100"); in main() 70 check(0, "+0"); in main() 71 check(0, "-0"); in main() 72 check(0, "+00000"); in main() 73 check(0, "-00000"); in main() 75 check(0, "0"); in main() 76 check(1, "1"); in main() 77 check(9, "9"); in main() 95 check(0, "+00000", 0, 6, 10); in main() [all …]
|
/libcore/ojluni/src/test/java/io/InputStream/ |
D | ReadNBytes.java | 74 check(nread == readBytes.length, in test() 76 check(Arrays.equals((tmp = Arrays.copyOf(inputBytes, nread)), readBytes), in test() 78 check(!in.isClosed(), "Stream unexpectedly closed"); in test() 83 check(nread == length - readBytes.length, in test() 85 check(Arrays.equals((tmp = Arrays.copyOfRange(inputBytes, readBytes.length, length)), in test() 89 check((x = in.read()) == -1, in test() 91 check((x = in.read(tmp)) == -1, in test() 93 check((x = in.read(tmp, 0, tmp.length)) == -1, in test() 95 check((x = in.readNBytes(tmp, 0, tmp.length)) == 0, in test() 97 check(!in.isClosed(), "Stream unexpectedly closed"); in test() [all …]
|
D | ReadAllBytes.java | 66 check((x = in.read()) == -1, in test() 68 check((x = in.read(tmp)) == -1, in test() 70 check((x = in.read(tmp, 0, tmp.length)) == -1, in test() 72 check(in.readAllBytes().length == 0, in test() 74 check(expectedLength == readBytes.length, in test() 76 check(Arrays.equals(expectedBytes, readBytes), in test() 78 check(!in.isClosed(), "Stream unexpectedly closed"); in test() 87 static void check(boolean cond, Object ... failedArgs) { in check() method in ReadAllBytes
|
/libcore/ojluni/src/test/java/lang/Long/ |
D | ParsingTest.java | 60 check(+100L, "+100"); in testParsing() 61 check(-100L, "-100"); in testParsing() 63 check(0L, "+0"); in testParsing() 64 check(0L, "-0"); in testParsing() 65 check(0L, "+00000"); in testParsing() 66 check(0L, "-00000"); in testParsing() 68 check(0L, "0"); in testParsing() 69 check(1L, "1"); in testParsing() 70 check(9L, "9"); in testParsing() 87 check(0L, "test-00000", 4, 10, 10); in testParsing() [all …]
|
/libcore/ojluni/src/test/java/util/PriorityQueue/ |
D | ForgetMeNot.java | 42 check(Arrays.equals(q.toArray(), elts)); in checkQ() 48 check(! it.hasNext()); in noMoreElements() 74 check(q.isEmpty()); in realMain() 75 check(! q.contains(1)); in realMain() 80 check(q.isEmpty()); in realMain() 87 check(! q.isEmpty()); in realMain() 88 check(q.contains(1)); in realMain() 91 check(it.hasNext()); in realMain() 95 check(q.isEmpty()); in realMain() 110 check(it.hasNext()); in realMain() [all …]
|
D | RemoveContains.java | 62 static void check(boolean condition, String msg) { in check() method in RemoveContains 69 static void check(boolean condition) { in check() method in RemoveContains 70 check(condition, "Assertion failure"); in check() 98 check(q.contains(word)); in test() 99 check(! q.contains("flurble")); in test() 101 check(q.remove("fi")); in test() 103 check(q.contains(word) ^ word.equals("fi")); in test() 105 check(! q.remove("fi")); in test() 106 check(! q.remove("flurble")); in test()
|
/libcore/ojluni/src/test/java/text/BreakIterator/ |
D | ExceptionTest.java | 61 check(bi.following(i), DONE); in main() 63 check(bi.following(i), mirror.following(i)); in main() 64 check(bi.current(), mirror.current()); in main() 69 check(bi.current(), mirror.current()); in main() 74 check(bi.current(), mirror.current()); in main() 82 check(bi.preceding(i), DONE); in main() 84 check(bi.preceding(i), mirror.preceding(i)); in main() 85 check(bi.current(), mirror.current()); in main() 90 check(bi.current(), mirror.current()); in main() 95 check(bi.current(), mirror.current()); in main() [all …]
|
/libcore/ojluni/src/test/java/util/regex/ |
D | RegExTest.java | 116 private static void check(Matcher m, String expected) { in check() method in RegExTest 121 private static void check(Matcher m, String result, boolean expected) { in check() method in RegExTest 126 private static void check(Pattern p, String s, boolean expected) { in check() method in RegExTest 130 private static void check(String p, String s, boolean expected) { in check() method in RegExTest 135 private static void check(String p, char c, boolean expected) { in check() method in RegExTest 143 private static void check(String p, int codePoint, boolean expected) { in check() method in RegExTest 151 private static void check(String p, int flag, String input, String s, in check() method in RegExTest 157 check(matcher, s, expected); in check() 159 check(pattern, input, expected); in check() 162 private static void check(Pattern p, String s, String g, String expected) { in check() method in RegExTest [all …]
|
/libcore/ojluni/src/test/java/nio/file/Path/ |
D | PathOps.java | 65 void check(Object result, String expected) { in check() method in PathOps 77 void check(Object result, boolean expected) { in check() method in PathOps 78 check(result, Boolean.toString(expected)); in check() 83 check(path.getRoot(), expected); in root() 89 check(path.getParent(), expected); in parent() 95 check(path.getFileName(), expected); in name() 101 check(path.getName(index), expected); in element() 107 check(path.subpath(startIndex, endIndex), expected); in subpath() 114 check(path.startsWith(s), true); in starts() 121 check(path.startsWith(s), false); in notStarts() [all …]
|
/libcore/ojluni/src/test/java/util/Arrays/ |
D | CopyMethods.java | 52 check(a.length == 3); in simpleTests() 53 check(a[0] == testValues[0]); in simpleTests() 54 check(a[1] == testValues[1]); in simpleTests() 55 check(a[2] == testValues[2]); in simpleTests() 84 check(ar.length == 2); in simpleTests() 85 check(ar[0] == a[1]); in simpleTests() 86 check(ar[1] == a[2]); in simpleTests() 89 check(ar.length == 2); in simpleTests() 90 check(ar[0] == a[2]); in simpleTests() 91 check(ar[1] == 0); in simpleTests() [all …]
|
/libcore/ojluni/src/test/java/lang/Double/ |
D | ParseDoubleTest.java | 47 private static void check(String val) { in check() method in ParseDoubleTest 125 private static void check(String val, double expected) { in check() method in ParseDoubleTest 129 check(val); in check() 134 check(new String(""+Double.MIN_VALUE), Double.MIN_VALUE); in rudimentaryTest() 135 check(new String(""+Double.MAX_VALUE), Double.MAX_VALUE); in rudimentaryTest() 137 check("10", (double) 10.0); in rudimentaryTest() 138 check("10.0", (double) 10.0); in rudimentaryTest() 139 check("10.01", (double) 10.01); in rudimentaryTest() 141 check("-10", (double) -10.0); in rudimentaryTest() 142 check("-10.00", (double) -10.0); in rudimentaryTest() [all …]
|