Home
last modified time | relevance | path

Searched refs:check (Results 1 – 25 of 146) sorted by relevance

123456

/libcore/ojluni/src/test/java/lang/StringBuffer/
DCompactStringBuffer.java54 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 …]
DSupplementary.java184 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/
DCompactStringBuilder.java54 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 …]
DSupplementary.java186 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/lang/Integer/
DDecode.java49 private static void check(String val, int expected) { in check() method in Decode
64 check(new String(""+Integer.MIN_VALUE), Integer.MIN_VALUE); in main()
65 check(new String(""+Integer.MAX_VALUE), Integer.MAX_VALUE); in main()
67 check("10", 10); in main()
68 check("0x10", 16); in main()
69 check("0X10", 16); in main()
70 check("010", 8); in main()
71 check("#10", 16); in main()
73 check("+10", 10); in main()
74 check("+0x10", 16); in main()
[all …]
DParsingTest.java62 check(+100, "+100"); in main()
63 check(-100, "-100"); in main()
65 check(0, "+0"); in main()
66 check(0, "-0"); in main()
67 check(0, "+00000"); in main()
68 check(0, "-00000"); in main()
70 check(0, "0"); in main()
71 check(1, "1"); in main()
72 check(9, "9"); in main()
90 check(0, "+00000", 0, 6, 10); in main()
[all …]
/libcore/ojluni/src/test/java/lang/Long/
DDecode.java51 private static void check(String val, long expected) { in check() method in Decode
66 check(new String(""+Long.MIN_VALUE), Long.MIN_VALUE); in main()
67 check(new String(""+Long.MAX_VALUE), Long.MAX_VALUE); in main()
69 check("10", 10L); in main()
70 check("0x10", 16L); in main()
71 check("0X10", 16L); in main()
72 check("010", 8L); in main()
73 check("#10", 16L); in main()
75 check("+10", 10L); in main()
76 check("+0x10", 16L); in main()
[all …]
DParsingTest.java59 check(+100L, "+100"); in main()
60 check(-100L, "-100"); in main()
62 check(0L, "+0"); in main()
63 check(0L, "-0"); in main()
64 check(0L, "+00000"); in main()
65 check(0L, "-00000"); in main()
67 check(0L, "0"); in main()
68 check(1L, "1"); in main()
69 check(9L, "9"); in main()
86 check(0L, "test-00000", 4, 10, 10); in main()
[all …]
/libcore/ojluni/src/test/java/util/Collections/
DNCopies.java56 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 …]
DCheckedNull.java87 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 …]
DEmptyIterator.java76 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 …]
DAsLifoQueue.java41 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
/libcore/ojluni/src/test/java/util/AbstractCollection/
DToArrayTest.java103 check(res instanceof String[]); in test()
104 check(res.length == 2); in test()
105 check(res[1] == "2"); in test()
110 check(false); in test()
112 check(t instanceof ArrayStoreException); in test()
118 check(res != a); in test()
119 check(res[LAST] != null); in test()
124 check(res == a); in test()
125 check(res[last()] != null); in test()
130 check(res == a); in test()
[all …]
/libcore/ojluni/src/test/java/util/Collection/
DMOAT.java406 check(c.containsAll(c)); in checkContainsSelf()
407 check(c.containsAll(Arrays.asList(c.toArray()))); in checkContainsSelf()
408 check(c.containsAll(Arrays.asList(c.toArray(new Integer[0])))); in checkContainsSelf()
412 check(c.containsAll(new ArrayList<Integer>())); in checkContainsEmpty()
422 check(count == 1); in checkUnique()
427 check(c.isEmpty()); in testEmptyCollection()
433 check(c.toArray(new Object[]{42})[0] == null); in testEmptyCollection()
443 check(! it.hasNext()); in testEmptyIterator()
453 check(! it.hasNext()); in testEmptyIterator()
622 check(m.isEmpty()); in testEmptyMap()
[all …]
/libcore/ojluni/src/test/java/nio/file/attribute/
DBasicFileAttributeViewTest.java45 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/text/Format/NumberFormat/
DBigDecimalParse.java121 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/String/concat/
DImplicitStringConcatAssignLHS.java113 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/lang/Float/
DParseFloat.java44 private static void check(String val) { in check() method in ParseFloat
122 private static void check(String val, float expected) { in check() method in ParseFloat
126 check(val); in check()
130 check(new String(""+Float.MIN_VALUE), Float.MIN_VALUE); in rudimentaryTest()
131 check(new String(""+Float.MAX_VALUE), Float.MAX_VALUE); in rudimentaryTest()
133 check("10", (float) 10.0); in rudimentaryTest()
134 check("10.0", (float) 10.0); in rudimentaryTest()
135 check("10.01", (float) 10.01); in rudimentaryTest()
137 check("-10", (float) -10.0); in rudimentaryTest()
138 check("-10.00", (float) -10.0); in rudimentaryTest()
[all …]
/libcore/ojluni/src/test/java/io/InputStream/
DReadNBytes.java74 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 …]
DReadAllBytes.java66 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/util/PriorityQueue/
DForgetMeNot.java42 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 …]
DRemoveContains.java62 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/
DExceptionTest.java61 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/
DRegExTest.java116 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/util/Arrays/
DCopyMethods.java52 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 …]

123456