Home
last modified time | relevance | path

Searched refs:assertEquals (Results 1 – 25 of 1224) sorted by relevance

12345678910>>...49

/dalvik/libcore/sql/src/test/java/tests/SQLite/
DConstantsTest.java43 assertEquals(c.SQLITE_OK, 0); in testConstants()
44 assertEquals(c.SQLITE_ERROR, 1); in testConstants()
45 assertEquals(c.SQLITE_INTERNAL, 2); in testConstants()
46 assertEquals(c.SQLITE_PERM, 3); in testConstants()
47 assertEquals(c.SQLITE_ABORT, 4); in testConstants()
48 assertEquals(c.SQLITE_BUSY, 5); in testConstants()
49 assertEquals(c.SQLITE_LOCKED, 6); in testConstants()
50 assertEquals(c.SQLITE_NOMEM, 7); in testConstants()
51 assertEquals(c.SQLITE_READONLY, 8); in testConstants()
52 assertEquals(c.SQLITE_INTERRUPT, 9); in testConstants()
[all …]
/dalvik/libcore/luni/src/test/java/org/apache/harmony/luni/tests/java/lang/
DLongTest.java54 assertEquals("Returned incorrect byte value", 127, l.byteValue()); in test_byteValue()
55 assertEquals("Returned incorrect byte value", -1, new Long(Long.MAX_VALUE) in test_byteValue()
72 assertEquals("-2 compared to -2 gave non-zero answer", 0, new Long(-2L) in test_compareToLjava_lang_Long()
96 assertEquals("Returned incorrect value for hex string", 255L, Long.decode( in test_decodeLjava_lang_String2()
98 assertEquals("Returned incorrect value for dec string", -89000L, Long.decode( in test_decodeLjava_lang_String2()
100 assertEquals("Returned incorrect value for 0 decimal", 0, Long.decode("0") in test_decodeLjava_lang_String2()
102 assertEquals("Returned incorrect value for 0 hex", 0, Long.decode("0x0") in test_decodeLjava_lang_String2()
261 assertEquals("Parsed to incorrect long value", 89000000005L, l); in test_parseLongLjava_lang_String2()
262 assertEquals("Returned incorrect value for 0", 0, Long.parseLong("0")); in test_parseLongLjava_lang_String2()
298 assertEquals("Returned incorrect value", in test_parseLongLjava_lang_StringI()
[all …]
DCharacter_UnicodeBlockTest.java36 assertEquals(Character.UnicodeBlock.BASIC_LATIN, Character.UnicodeBlock.of((char)0x0)); in test_ofC()
37 assertEquals(Character.UnicodeBlock.BASIC_LATIN, Character.UnicodeBlock.of((char)0x7f)); in test_ofC()
38assertEquals(Character.UnicodeBlock.LATIN_1_SUPPLEMENT, Character.UnicodeBlock.of((char)0x80)); in test_ofC()
39assertEquals(Character.UnicodeBlock.LATIN_1_SUPPLEMENT, Character.UnicodeBlock.of((char)0xff)); in test_ofC()
40assertEquals(Character.UnicodeBlock.LATIN_EXTENDED_A, Character.UnicodeBlock.of((char)0x100)); in test_ofC()
41assertEquals(Character.UnicodeBlock.LATIN_EXTENDED_A, Character.UnicodeBlock.of((char)0x17f)); in test_ofC()
42assertEquals(Character.UnicodeBlock.LATIN_EXTENDED_B, Character.UnicodeBlock.of((char)0x180)); in test_ofC()
43assertEquals(Character.UnicodeBlock.LATIN_EXTENDED_B, Character.UnicodeBlock.of((char)0x24f)); in test_ofC()
44 assertEquals(Character.UnicodeBlock.IPA_EXTENSIONS, Character.UnicodeBlock.of((char)0x250)); in test_ofC()
45 assertEquals(Character.UnicodeBlock.IPA_EXTENSIONS, Character.UnicodeBlock.of((char)0x2af)); in test_ofC()
[all …]
DMathTest.java36 public static void assertEquals(String message, double expected, double actual, double delta) { in assertEquals() method in MathTest
38 junit.framework.Assert.assertEquals(message, expected, actual, Math.ulp(expected)); in assertEquals()
40 junit.framework.Assert.assertEquals(message, expected, actual, delta); in assertEquals()
43 public static void assertEquals(String message, float expected, float actual, float delta) { in assertEquals() method in MathTest
45 junit.framework.Assert.assertEquals(message, expected, actual, Math.ulp(expected)); in assertEquals()
47 junit.framework.Assert.assertEquals(message, expected, actual, delta); in assertEquals()
65 assertEquals(0.0, Math.abs(0.0)); in test_absD()
66 assertEquals(0.0, Math.abs(-0.0)); in test_absD()
67 assertEquals(Double.POSITIVE_INFINITY, in test_absD()
69 assertEquals(Double.POSITIVE_INFINITY, in test_absD()
[all …]
DStrictMathTest.java53 assertEquals("Incorrect value was returned.", 1.0, in test_pow()
55 assertEquals("Incorrect value was returned.", 1.0, in test_pow()
57 assertEquals("Incorrect value was returned.", Double.NaN, in test_pow()
59 assertEquals("Incorrect value was returned.", Double.NaN, in test_pow()
61 assertEquals("Incorrect value was returned.", Double.POSITIVE_INFINITY, in test_pow()
63 assertEquals("Incorrect value was returned.", Double.POSITIVE_INFINITY, in test_pow()
66 assertEquals("Incorrect value was returned.", 0.0, in test_pow()
68 assertEquals("Incorrect value was returned.", 0.0, in test_pow()
71 assertEquals("Incorrect value was returned.", Double.NaN, in test_pow()
73 assertEquals("Incorrect value was returned.", Double.NaN, in test_pow()
[all …]
DIntegerTest.java53 assertEquals("Returned incorrect byte value", -1, new Integer(65535) in test_byteValue()
55 assertEquals("Returned incorrect byte value", 127, new Integer(127) in test_byteValue()
72 assertEquals("-2 compared to -2 gave non-zero answer", 0, new Integer(-2) in test_compareToLjava_lang_Integer()
96 assertEquals("Failed for 132233", in test_decodeLjava_lang_String2()
98 assertEquals("Failed for 07654321", in test_decodeLjava_lang_String2()
104 assertEquals("Failed for -23", -23, Integer.decode("-23").intValue()); in test_decodeLjava_lang_String2()
105 assertEquals("Returned incorrect value for 0 decimal", 0, Integer in test_decodeLjava_lang_String2()
107 assertEquals("Returned incorrect value for 0 hex", 0, Integer.decode("0x0") in test_decodeLjava_lang_String2()
185 assertEquals("Returned incorrect double value", 2147483647.0, new Integer(2147483647) in test_doubleValue2()
187 assertEquals("Returned incorrect double value", -2147483647.0, new Integer(-2147483647) in test_doubleValue2()
[all …]
DShortTest.java42 assertEquals("Returned incorrect byte value", 0, new Short(Short.MIN_VALUE) in test_byteValue()
44 assertEquals("Returned incorrect byte value", -1, new Short(Short.MAX_VALUE) in test_byteValue()
69 assertEquals("Should have returned zero when compared to equal short", in test_compareToLjava_lang_Short()
169 assertEquals("Returned incorrect value for 0", 0, Short.parseShort("0")); in test_parseShortLjava_lang_String2()
207 assertEquals("Incorrectly parsed hex string", in test_parseShortLjava_lang_StringI2()
209 assertEquals("Incorrectly parsed oct string", in test_parseShortLjava_lang_StringI2()
211 assertEquals("Incorrectly parsed dec string", in test_parseShortLjava_lang_StringI2()
213 assertEquals("Incorrectly parsed bin string", in test_parseShortLjava_lang_StringI2()
215 assertEquals("Incorrectly parsed -hex string", -255, Short in test_parseShortLjava_lang_StringI2()
217 assertEquals("Incorrectly parsed -oct string", in test_parseShortLjava_lang_StringI2()
[all …]
DByteTest.java39 assertEquals(new Byte(Byte.MIN_VALUE), Byte.valueOf(Byte.MIN_VALUE)); in test_valueOfB()
40 assertEquals(new Byte(Byte.MAX_VALUE), Byte.valueOf(Byte.MAX_VALUE)); in test_valueOfB()
41 assertEquals(new Byte((byte) 0), Byte.valueOf((byte) 0)); in test_valueOfB()
45 assertEquals(new Byte(b), Byte.valueOf(b)); in test_valueOfB()
61 assertEquals(1, new Byte((byte) 1).hashCode()); in test_hashCode()
62 assertEquals(2, new Byte((byte) 2).hashCode()); in test_hashCode()
63 assertEquals(0, new Byte((byte) 0).hashCode()); in test_hashCode()
64 assertEquals(-1, new Byte((byte) -1).hashCode()); in test_hashCode()
77 assertEquals(new Byte((byte) 0), new Byte("0")); in test_ConstructorLjava_lang_String()
78 assertEquals(new Byte((byte) 1), new Byte("1")); in test_ConstructorLjava_lang_String()
[all …]
DStringBufferTest.java66 assertEquals(str.length(), sb.length()); in test_constructorLjava_lang_CharSequence()
73assertEquals("Assert 1: must equal 'abc'.", "abc", new StringBuffer((CharSequence)"abc").toString(… in test_constructorLjava_lang_CharSequence()
88 assertEquals("Assert 1: length must still be 3", 3, buffer.length()); in test_trimToSize()
89 assertEquals("Assert 2: value must still be 'abc'.", "abc", buffer.toString()); in test_trimToSize()
104 assertEquals("ab", sb.toString()); in test_appendLjava_lang_CharSequence()
107 assertEquals("cd", sb.toString()); in test_appendLjava_lang_CharSequence()
110 assertEquals("null", sb.toString()); in test_appendLjava_lang_CharSequence()
124 assertEquals(sb1.toString(), originalSB.toString()); in test_appendLStringBuffer()
126 assertEquals(sb1.toString() + sb2.toString(), originalSB.toString()); in test_appendLStringBuffer()
128 assertEquals(sb1.toString() + sb2.toString() + "null", in test_appendLStringBuffer()
[all …]
DStringBuilderTest.java48 assertEquals(16, sb.capacity()); in test_Constructor()
63 assertEquals(24, sb.capacity()); in test_ConstructorI()
87 assertEquals("fixture", sb.toString()); in test_ConstructorLjava_lang_CharSequence()
88 assertEquals("fixture".length() + 16, sb.capacity()); in test_ConstructorLjava_lang_CharSequence()
91 assertEquals("fixture", sb.toString()); in test_ConstructorLjava_lang_CharSequence()
92 assertEquals("fixture".length() + 16, sb.capacity()); in test_ConstructorLjava_lang_CharSequence()
113 assertEquals("fixture", sb.toString()); in test_ConstructorLjava_lang_String()
114 assertEquals("fixture".length() + 16, sb.capacity()); in test_ConstructorLjava_lang_String()
135 assertEquals("true", sb.toString()); in test_appendZ()
138 assertEquals("false", sb.toString()); in test_appendZ()
[all …]
/dalvik/libcore/regex/src/test/java/org/apache/harmony/regex/tests/java/util/regex/
DSplitTest.java35 assertEquals(expected.length, results.length); in testSimple()
37 assertEquals(results[i], expected[i]); in testSimple()
54 assertEquals(1, tokens.length); in testSplit1()
57 assertEquals(2, tokens.length); in testSplit1()
58 assertEquals("poodle", tokens[0]); in testSplit1()
59 assertEquals("zoo", tokens[1]); in testSplit1()
61 assertEquals(2, tokens.length); in testSplit1()
62 assertEquals("poodle", tokens[0]); in testSplit1()
63 assertEquals("zoo", tokens[1]); in testSplit1()
65 assertEquals(2, tokens.length); in testSplit1()
[all …]
/dalvik/libcore/xml/src/test/java/tests/api/org/xml/sax/helpers/
DAttributesImplTest.java54 assertEquals(0, empty.getLength()); in testAttributesImpl()
55 assertEquals(5, multi.getLength()); in testAttributesImpl()
66 assertEquals(0, ai.getLength()); in testAttributesImplAttributes()
70 assertEquals(5, ai.getLength()); in testAttributesImplAttributes()
75 assertEquals(0, ai.getLength()); in testAttributesImplAttributes()
89 assertEquals(0, ai.getLength()); in testGetLength()
92 assertEquals(5, ai.getLength()); in testGetLength()
96 assertEquals(i, ai.getLength()); in testGetLength()
107 assertEquals("http://some.uri", multi.getURI(0)); in testGetURI()
108 assertEquals("http://some.uri", multi.getURI(1)); in testGetURI()
[all …]
DAttributeListImplTest.java49 assertEquals(0, empty.getLength()); in testAttributeListImpl()
50 assertEquals(3, multi.getLength()); in testAttributeListImpl()
61 assertEquals(0, ai.getLength()); in testAttributeListImplAttributeList()
65 assertEquals(3, ai.getLength()); in testAttributeListImplAttributeList()
70 assertEquals(0, ai.getLength()); in testAttributeListImplAttributeList()
88 assertEquals(0, attrs.getLength()); in testSetAttributeList()
91 assertEquals(multi.getLength(), attrs.getLength()); in testSetAttributeList()
94 assertEquals(multi.getName(i), attrs.getName(i)); in testSetAttributeList()
95 assertEquals(multi.getType(i), attrs.getType(i)); in testSetAttributeList()
96 assertEquals(multi.getValue(i), attrs.getValue(i)); in testSetAttributeList()
[all …]
/dalvik/libcore/text/src/test/java/org/apache/harmony/text/tests/java/text/
DStringCharacterIteratorTest.java146 assertEquals(sci0, sci0); in test_equalsLjava_lang_Object()
151 assertEquals(sci0, sci1); in test_equalsLjava_lang_Object()
156 assertEquals(sci0, sci1); in test_equalsLjava_lang_Object()
183 assertEquals(sci0, sci1); in test_clone()
202 assertEquals('f', fixture.current()); in test_current()
204 assertEquals('i', fixture.current()); in test_current()
208 assertEquals("Wrong current char", 'i', it.current()); in test_current()
211 assertEquals("Doesn't return DONE", StringCharacterIterator.DONE, in test_current()
214 assertEquals("Doesn't return DONE after next()", in test_current()
230 assertEquals('f', fixture.first()); in test_first()
[all …]
DDecimalFormatTestICU.java66 assertEquals("sigDigit doesn't work", "12300", format.format(12345)); in test_sigDigitPatterns()
67 assertEquals("sigDigit doesn't work", "0.123", format.format(0.12345)); in test_sigDigitPatterns()
70 assertEquals("sigDigit doesn't work", "3.142", format.format(3.14159)); in test_sigDigitPatterns()
71 assertEquals("sigDigit doesn't work", "1.23", format.format(1.23004)); in test_sigDigitPatterns()
74 assertEquals("1.23E1", format.format(12.3)); in test_sigDigitPatterns()
76 assertEquals("1.23E1", format.format(12.3)); in test_sigDigitPatterns()
112 assertEquals("xxxxxxxxx123.0", format.format(123)); in test_paddingPattern()
113 assertEquals(123, format.parse("xxxxxxxxx123.0").intValue()); in test_paddingPattern()
116 assertEquals("$xx123.00", format.format(123)); in test_paddingPattern()
117 assertEquals("$1,234.00", format.format(1234)); in test_paddingPattern()
[all …]
DBidiTest.java39 assertEquals("different length", expected.length, bidi.getRunCount()); in assertRunArrayEquals()
243 assertEquals(0, bd.getBaseLevel()); in testEmptyParagraph()
244 assertEquals(0, bd.getLength()); in testEmptyParagraph()
245 assertEquals(0, bd.getLevelAt(0)); in testEmptyParagraph()
246 assertEquals(0, bd.getLevelAt(1000)); in testEmptyParagraph()
247 assertEquals(1, bd.getRunCount()); in testEmptyParagraph()
255 assertEquals(1, bd.getBaseLevel()); in testEmptyParagraph()
256 assertEquals(0, bd.getLength()); in testEmptyParagraph()
257 assertEquals(1, bd.getLevelAt(0)); in testEmptyParagraph()
258 assertEquals(1, bd.getLevelAt(1000)); in testEmptyParagraph()
[all …]
/dalvik/libcore/xml/src/test/java/tests/api/org/xml/sax/ext/
DAttributes2ImplTest.java81 assertEquals(0, attrs.getLength()); in testSetAttributes()
85 assertEquals(multi.getURI(i), attrs.getURI(i)); in testSetAttributes()
86 assertEquals(multi.getLocalName(i), attrs.getLocalName(i)); in testSetAttributes()
87 assertEquals(multi.getQName(i), attrs.getQName(i)); in testSetAttributes()
88 assertEquals(multi.getType(i), attrs.getType(i)); in testSetAttributes()
89 assertEquals(multi.getValue(i), attrs.getValue(i)); in testSetAttributes()
90 assertEquals(multi.isDeclared(i), attrs.isDeclared(i)); in testSetAttributes()
91 assertEquals(multi.isSpecified(i), attrs.isSpecified(i)); in testSetAttributes()
95 assertEquals(0, attrs.getLength()); in testSetAttributes()
99 assertEquals(multi.getLength(), attrs.getLength()); in testSetAttributes()
[all …]
/dalvik/libcore/concurrent/src/test/java/tests/api/java/util/concurrent/
DAtomicIntegerTest.java28 assertEquals(1,ai.get()); in testConstructor()
36 assertEquals(0,ai.get()); in testConstructor2()
44 assertEquals(1,ai.get()); in testGetSet()
46 assertEquals(2,ai.get()); in testGetSet()
48 assertEquals(-3,ai.get()); in testGetSet()
58 assertEquals(-4,ai.get()); in testCompareAndSet()
62 assertEquals(7,ai.get()); in testCompareAndSet()
80 assertEquals(ai.get(), 3); in testCompareAndSetInMultipleThreads()
95 assertEquals(-4,ai.get()); in testWeakCompareAndSet()
97 assertEquals(7,ai.get()); in testWeakCompareAndSet()
[all …]
DAtomicStampedReferenceTest.java27 assertEquals(one,ai.getReference()); in testConstructor()
28 assertEquals(0, ai.getStamp()); in testConstructor()
31 assertEquals(1, a2.getStamp()); in testConstructor()
41 assertEquals(one,ai.getReference()); in testGetSet()
42 assertEquals(0, ai.getStamp()); in testGetSet()
43 assertEquals(one, ai.get(mark)); in testGetSet()
44 assertEquals(0, mark[0]); in testGetSet()
46 assertEquals(two,ai.getReference()); in testGetSet()
47 assertEquals(0, ai.getStamp()); in testGetSet()
48 assertEquals(two, ai.get(mark)); in testGetSet()
[all …]
DAtomicLongTest.java28 assertEquals(1,ai.get()); in testConstructor()
36 assertEquals(0,ai.get()); in testConstructor2()
44 assertEquals(1,ai.get()); in testGetSet()
46 assertEquals(2,ai.get()); in testGetSet()
48 assertEquals(-3,ai.get()); in testGetSet()
58 assertEquals(-4,ai.get()); in testCompareAndSet()
62 assertEquals(7,ai.get()); in testCompareAndSet()
80 assertEquals(ai.get(), 3); in testCompareAndSetInMultipleThreads()
95 assertEquals(-4,ai.get()); in testWeakCompareAndSet()
97 assertEquals(7,ai.get()); in testWeakCompareAndSet()
[all …]
DAtomicIntegerFieldUpdaterTest.java76 assertEquals(1,a.get(this)); in testGetSet()
78 assertEquals(2,a.get(this)); in testGetSet()
80 assertEquals(-3,a.get(this)); in testGetSet()
96 assertEquals(-4,a.get(this)); in testCompareAndSet()
100 assertEquals(7,a.get(this)); in testCompareAndSet()
126 assertEquals(a.get(this), 3); in testCompareAndSetInMultipleThreads()
147 assertEquals(-4,a.get(this)); in testWeakCompareAndSet()
149 assertEquals(7,a.get(this)); in testWeakCompareAndSet()
163 assertEquals(1,a.getAndSet(this, 0)); in testGetAndSet()
164 assertEquals(0,a.getAndSet(this,-10)); in testGetAndSet()
[all …]
DAtomicLongFieldUpdaterTest.java78 assertEquals(1,a.get(this)); in testGetSet()
80 assertEquals(2,a.get(this)); in testGetSet()
82 assertEquals(-3,a.get(this)); in testGetSet()
98 assertEquals(-4,a.get(this)); in testCompareAndSet()
102 assertEquals(7,a.get(this)); in testCompareAndSet()
128 assertEquals(a.get(this), 3); in testCompareAndSetInMultipleThreads()
149 assertEquals(-4,a.get(this)); in testWeakCompareAndSet()
151 assertEquals(7,a.get(this)); in testWeakCompareAndSet()
165 assertEquals(1,a.getAndSet(this, 0)); in testGetAndSet()
166 assertEquals(0,a.getAndSet(this,-10)); in testGetAndSet()
[all …]
/dalvik/libcore/xml/src/test/java/tests/api/org/xml/sax/
DSAXParseExceptionTest.java92 assertEquals(ERR, e.getMessage()); in testSAXParseException_String_Locator_Exception()
93 assertEquals(c, e.getException()); in testSAXParseException_String_Locator_Exception()
95 assertEquals(PUB, e.getPublicId()); in testSAXParseException_String_Locator_Exception()
96 assertEquals(SYS, e.getSystemId()); in testSAXParseException_String_Locator_Exception()
97 assertEquals(ROW, e.getLineNumber()); in testSAXParseException_String_Locator_Exception()
98 assertEquals(COL, e.getColumnNumber()); in testSAXParseException_String_Locator_Exception()
104 assertEquals(c, e.getException()); in testSAXParseException_String_Locator_Exception()
106 assertEquals(PUB, e.getPublicId()); in testSAXParseException_String_Locator_Exception()
107 assertEquals(SYS, e.getSystemId()); in testSAXParseException_String_Locator_Exception()
108 assertEquals(ROW, e.getLineNumber()); in testSAXParseException_String_Locator_Exception()
[all …]
/dalvik/libcore/luni/src/test/java/org/apache/harmony/luni/tests/java/util/
DUUIDTest.java45 assertEquals(2, uuid.variant()); in test_ConstructurJJ()
46 assertEquals(1, uuid.version()); in test_ConstructurJJ()
47 assertEquals(0x1d07decf81d4faeL, uuid.timestamp()); in test_ConstructurJJ()
48 assertEquals(130742845922168750L, uuid.timestamp()); in test_ConstructurJJ()
49 assertEquals(0x2765, uuid.clockSequence()); in test_ConstructurJJ()
50 assertEquals(0xA0C91E6BF6L, uuid.node()); in test_ConstructurJJ()
64 assertEquals(0, uuid.getLeastSignificantBits()); in test_getLeastSignificantBits()
66 assertEquals(Long.MIN_VALUE, uuid.getLeastSignificantBits()); in test_getLeastSignificantBits()
68 assertEquals(Long.MAX_VALUE, uuid.getLeastSignificantBits()); in test_getLeastSignificantBits()
82 assertEquals(0, uuid.getMostSignificantBits()); in test_getMostSignificantBits()
[all …]
/dalvik/libcore/luni/src/test/java/tests/api/java/util/
DScannerTest.java462 assertEquals("\\p{javaWhitespace}+", pattern.toString()); in test_delimiter()
477 assertEquals("\\w+", s.delimiter().toString()); in test_useDelimiter_LPattern()
504 assertEquals("\\w+", s.delimiter().toString()); in test_useDelimiter_String()
518 assertEquals(Locale.getDefault(), s.locale()); in test_locale()
540 assertEquals(new Locale("test", "test"), s.locale()); in test_useLocale_LLocale()
554 assertEquals(10, s.radix()); in test_radix()
581 assertEquals(11, s.radix()); in test_useRadix_I()
621 assertEquals("1", s.next()); in test_match()
622 assertEquals("2", s.next()); in test_match()
624 assertEquals(2, result.start()); in test_match()
[all …]

12345678910>>...49