Home
last modified time | relevance | path

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

12345678910>>...84

/cts/tests/tests/view/src/android/view/cts/
DGravityTest.java19 import static org.junit.Assert.assertEquals;
63 assertEquals(19, mOutRect.left); in testApply()
64 assertEquals(21, mOutRect.right); in testApply()
65 assertEquals(20, mOutRect.top); in testApply()
66 assertEquals(23, mOutRect.bottom); in testApply()
68 assertEquals(24, mOutRect.left); in testApply()
69 assertEquals(26, mOutRect.right); in testApply()
70 assertEquals(25, mOutRect.top); in testApply()
71 assertEquals(28, mOutRect.bottom); in testApply()
73 assertEquals(19, mOutRect.left); in testApply()
[all …]
DMotionEventUtils.java19 import static org.junit.Assert.assertEquals;
58 assertEquals("Pointer ID should be the same", in verifyMatches()
60 assertEquals("Tool type should be the same", in verifyMatches()
65 assertEquals("Pointer ID should be the same", that.id, this.id); in verifyMatchesPointerProperties()
66 assertEquals("Tool type should be the same", that.toolType, this.toolType); in verifyMatchesPointerProperties()
130 assertEquals("X coordinates should be the same", that.getX(), this.x, DELTA); in verifyMatches()
131 assertEquals("X coordinates should be the same", in verifyMatches()
134 assertEquals("Y coordinates should be the same", that.getY(), this.y, DELTA); in verifyMatches()
135 assertEquals("Y coordinates should be the same", in verifyMatches()
138 assertEquals("Pressure should be the same", that.getPressure(), this.pressure, DELTA); in verifyMatches()
[all …]
DViewGroup_MarginLayoutParamsTest.java19 import static org.junit.Assert.assertEquals;
88 assertEquals(20, mMarginLayoutParams.leftMargin); in testSetMargins()
89 assertEquals(30, mMarginLayoutParams.topMargin); in testSetMargins()
90 assertEquals(120, mMarginLayoutParams.rightMargin); in testSetMargins()
91 assertEquals(140, mMarginLayoutParams.bottomMargin); in testSetMargins()
93 assertEquals(20, mMarginLayoutParams.getMarginStart()); in testSetMargins()
94 assertEquals(120, mMarginLayoutParams.getMarginEnd()); in testSetMargins()
96 assertEquals(false, mMarginLayoutParams.isMarginRelative()); in testSetMargins()
106 assertEquals(20, mMarginLayoutParams.getMarginStart()); in testSetMarginsRelative()
107 assertEquals(30, mMarginLayoutParams.topMargin); in testSetMarginsRelative()
[all …]
/cts/tests/tests/graphics/src/android/graphics/cts/
DRectFTest.java19 import static org.junit.Assert.assertEquals;
54 assertEquals(10.0f, mRectF.left, 0.0f); in testSort()
55 assertEquals(10.0f, mRectF.top, 0.0f); in testSort()
56 assertEquals(5.0f, mRectF.right, 0.0f); in testSort()
57 assertEquals(5.0f, mRectF.bottom, 0.0f); in testSort()
60 assertEquals(5.0f, mRectF.left, 0.0f); in testSort()
61 assertEquals(5.0f, mRectF.top, 0.0f); in testSort()
62 assertEquals(10.0f, mRectF.right, 0.0f); in testSort()
63 assertEquals(10.0f, mRectF.bottom, 0.0f); in testSort()
70 assertEquals(1.0f, mRectF.left, 0.0f); in testSet1()
[all …]
DRectTest.java19 import static org.junit.Assert.assertEquals;
53 assertEquals(1, mRect.left); in testSet1()
54 assertEquals(2, mRect.top); in testSet1()
55 assertEquals(3, mRect.right); in testSet1()
56 assertEquals(4, mRect.bottom); in testSet1()
64 assertEquals(1, mRect.left); in testSet2()
65 assertEquals(2, mRect.top); in testSet2()
66 assertEquals(3, mRect.right); in testSet2()
67 assertEquals(4, mRect.bottom); in testSet2()
74 assertEquals(0, mRect.left); in testIntersects1()
[all …]
DRegionIteratorTest.java19 import static org.junit.Assert.assertEquals;
55 assertEquals(1, rect.left); in testNext()
56 assertEquals(1, rect.top); in testNext()
57 assertEquals(10, rect.right); in testNext()
58 assertEquals(10, rect.bottom); in testNext()
61 assertEquals(1, rect.left); in testNext()
62 assertEquals(1, rect.top); in testNext()
63 assertEquals(1, rect.right); in testNext()
64 assertEquals(1, rect.bottom); in testNext()
72 assertEquals(1, rect.left); in testNext()
[all …]
DColor_ColorLongTest.java29 import static org.junit.Assert.assertEquals;
53 assertEquals(0.5f, red(pack(0.5f, 0.0f, 1.0f)), 0.01f); in testRed()
54 assertEquals(0.5f, red(pack(0.5f, 0.0f, 1.0f, 1.0f, p3)), 0.01f); in testRed()
61 assertEquals(0.7f, green(pack(0.5f, 0.7f, 1.0f)), 0.01f); in testGreen()
62 assertEquals(0.7f, green(pack(0.5f, 0.7f, 1.0f, 1.0f, p3)), 0.01f); in testGreen()
69 assertEquals(1.0f, blue(pack(0.5f, 0.7f, 1.0f)), 0.01f); in testBlue()
70 assertEquals(1.0f, blue(pack(0.5f, 0.7f, 1.0f, 1.0f, p3)), 0.01f); in testBlue()
77 assertEquals(0.25f, alpha(pack(0.5f, 0.7f, 1.0f, 0.25f)), 0.01f); in testAlpha()
78 assertEquals(0.25f, alpha(pack(0.5f, 0.7f, 1.0f, 0.25f, p3)), 0.01f); in testAlpha()
86 assertEquals(srgb, colorSpace(pack(0.5f, 0.7f, 1.0f))); in testColorSpace()
[all …]
DFontVariationAxisTest.java19 import static org.junit.Assert.assertEquals;
50 assertEquals("wght", axis.getTag()); in testGetterTest()
51 assertEquals(1.0f, axis.getStyleValue(), FLOT_EQUALITY_PREC); in testGetterTest()
54 assertEquals("PRIV", axis.getTag()); in testGetterTest()
55 assertEquals(-1.0f, axis.getStyleValue(), FLOT_EQUALITY_PREC); in testGetterTest()
79 assertEquals(1, axes.length); in testFromFontVariationSetting_Single()
80 assertEquals("wdth", axes[0].getTag()); in testFromFontVariationSetting_Single()
81 assertEquals(1.0f, axes[0].getStyleValue(), FLOT_EQUALITY_PREC); in testFromFontVariationSetting_Single()
84 assertEquals(1, axes.length); in testFromFontVariationSetting_Single()
85 assertEquals("wdth", axes[0].getTag()); in testFromFontVariationSetting_Single()
[all …]
/cts/tests/tests/graphics/src/android/graphics/text/cts/
DLineBreakerTest.java30 import static org.junit.Assert.assertEquals;
108 assertEquals(0, c.getWidth(), 0.0f); // 0 by default in testSetGetWidth()
110 assertEquals(100, c.getWidth(), 0.0f); in testSetGetWidth()
112 assertEquals(200, c.getWidth(), 0.0f); in testSetGetWidth()
118 assertEquals(0.0f, c.getFirstWidth(), 0.0f); // 0 by default in testSetGetIndent()
119 assertEquals(0, c.getFirstWidthLineCount()); // 0 by default in testSetGetIndent()
121 assertEquals(100.0f, c.getFirstWidth(), 0.0f); in testSetGetIndent()
122 assertEquals(1, c.getFirstWidthLineCount()); in testSetGetIndent()
124 assertEquals(200.0f, c.getFirstWidth(), 0.0f); in testSetGetIndent()
125 assertEquals(5, c.getFirstWidthLineCount()); in testSetGetIndent()
[all …]
/cts/tests/tests/text/src/android/text/style/cts/
DTtsSpanTest.java19 import static org.junit.Assert.assertEquals;
50 assertEquals(4, args.size()); in testGetArgs()
51 assertEquals("value.one", args.getString("argument.one")); in testGetArgs()
52 assertEquals("value.two", args.getString("argument.two")); in testGetArgs()
53 assertEquals(3, args.getLong("argument.three")); in testGetArgs()
54 assertEquals(4, args.getLong("argument.four")); in testGetArgs()
60 assertEquals("test.type.two", t.getType()); in testGetType()
85 assertEquals("test.type.five", t.getType()); in testWriteAndReadParcel()
87 assertEquals(4, args.size()); in testWriteAndReadParcel()
88 assertEquals("value.one", args.getString("argument.one")); in testWriteAndReadParcel()
[all …]
/cts/tests/tests/text/src/android/text/cts/
DSelectionTest.java19 import static org.junit.Assert.assertEquals;
47 assertEquals(-1, Selection.getSelectionStart(builder)); in testGetSelectionStart()
50 assertEquals(3, Selection.getSelectionStart(builder)); in testGetSelectionStart()
53 assertEquals(3, Selection.getSelectionStart(builder)); in testGetSelectionStart()
56 assertEquals(5, Selection.getSelectionStart(builder)); in testGetSelectionStart()
58 assertEquals(-1, Selection.getSelectionStart(null)); in testGetSelectionStart()
65 assertEquals(-1, Selection.getSelectionEnd(builder)); in testGetSelectionEnd()
68 assertEquals(10, Selection.getSelectionEnd(builder)); in testGetSelectionEnd()
71 assertEquals(8, Selection.getSelectionEnd(builder)); in testGetSelectionEnd()
74 assertEquals(8, Selection.getSelectionEnd(builder)); in testGetSelectionEnd()
[all …]
/cts/tests/tests/database/src/android/database/cts/
DMatrixCursorTest.java56 assertEquals(0, mMatrixCursor.getCount()); in testNewRow()
59 assertEquals(1, mMatrixCursor.getCount()); in testNewRow()
67 assertEquals(Integer.MIN_VALUE, mMatrixCursor.getInt(COLUMN0_INDEX)); in testNewRow()
73 assertEquals(Integer.MIN_VALUE, mMatrixCursor.getInt(COLUMN0_INDEX)); in testNewRow()
75 assertEquals(0, mMatrixCursor.getInt(COLUMN1_INDEX)); in testNewRow()
80 assertEquals(Integer.MIN_VALUE, mMatrixCursor.getInt(COLUMN0_INDEX)); in testNewRow()
82 assertEquals(0, mMatrixCursor.getInt(COLUMN1_INDEX)); in testNewRow()
84 assertEquals(Integer.MAX_VALUE, mMatrixCursor.getInt(COLUMN2_INDEX)); in testNewRow()
94 assertEquals(2, mMatrixCursor.getCount()); in testNewRow()
98 assertEquals(0, mMatrixCursor.getCount()); in testAddRow()
[all …]
/cts/tests/tests/proto/src/android/util/proto/cts/
DEncodedBufferTest.java35 public void assertEquals(byte[] expected, EncodedBuffer actual) { in assertEquals() method in EncodedBufferTest
39 assertEquals("actual.getWritePos() == expected.length", expected.length, in assertEquals()
54 assertEquals(100, buffer.getChunkCount()); in testWriteRawByteWrapsChunks()
55 assertEquals(99, buffer.getWriteBufIndex()); in testWriteRawByteWrapsChunks()
56 assertEquals(1, buffer.getWriteIndex()); in testWriteRawByteWrapsChunks()
62 assertEquals(2, buffer.getChunkCount()); in testWriteRawByteWrapsChunks()
63 assertEquals(1, buffer.getWriteBufIndex()); in testWriteRawByteWrapsChunks()
64 assertEquals(50, buffer.getWriteIndex()); in testWriteRawByteWrapsChunks()
70 assertEquals(3, buffer.getChunkCount()); in testWriteRawByteWrapsChunks()
71 assertEquals(2, buffer.getWriteBufIndex()); in testWriteRawByteWrapsChunks()
[all …]
/cts/tests/tests/libcorelegacy22/src/android/util/cts/
DFloatMathTest.java24 assertEquals(5.0f, FloatMath.sqrt(25)); in testSqrt()
25 assertEquals(7, FloatMath.sqrt(49), 0); in testSqrt()
26 assertEquals(10, FloatMath.sqrt(100), 0); in testSqrt()
27 assertEquals(0, FloatMath.sqrt(0), 0); in testSqrt()
28 assertEquals(1, FloatMath.sqrt(1), 0); in testSqrt()
32 assertEquals(78, FloatMath.floor(78.89f), 0); in testFloor()
33 assertEquals(-79, FloatMath.floor(-78.89f), 0); in testFloor()
34 assertEquals(7.0f, FloatMath.floor(7.2f)); in testFloor()
35 assertEquals(-7.0f, FloatMath.floor(-6.3f)); in testFloor()
39 assertEquals(79, FloatMath.ceil(78.89f), 0); in testCeil()
[all …]
/cts/tests/tests/text/src/android/text/format/cts/
DFormatterTest.java19 import static org.junit.Assert.assertEquals;
43 assertEquals("", Formatter.formatFileSize(null, 0)); in testFormatFileSize()
53 assertEquals("0 B", Formatter.formatFileSize(context, 0)); in testFormatFileSize()
54 assertEquals("1 B", Formatter.formatFileSize(context, 1)); in testFormatFileSize()
55 assertEquals("9 B", Formatter.formatFileSize(context, 9)); in testFormatFileSize()
56 assertEquals("10 B", Formatter.formatFileSize(context, 10)); in testFormatFileSize()
57 assertEquals("99 B", Formatter.formatFileSize(context, 99)); in testFormatFileSize()
58 assertEquals("100 B", Formatter.formatFileSize(context, 100)); in testFormatFileSize()
59 assertEquals("900 B", Formatter.formatFileSize(context, 900)); in testFormatFileSize()
60 assertEquals("0.90 kB", Formatter.formatFileSize(context, 901)); in testFormatFileSize()
[all …]
/cts/tests/tests/util/src/android/util/cts/
DHalfTest.java21 import static org.junit.Assert.assertEquals;
38 assertEquals((long) (a & 0xffff), (long) (b & 0xffff)); in assertShortEquals()
42 assertEquals((long) (a & 0xffff), (long) (b & 0xffff)); in assertShortEquals()
88 assertEquals(0.0f, toFloat(toHalf(0.0f)), 1e-6f); in halfToSingle()
89 assertEquals(-0.0f, toFloat(toHalf(-0.0f)), 1e-6f); in halfToSingle()
90 assertEquals(Float.NaN, toFloat(toHalf(Float.NaN)), 1e-6f); in halfToSingle()
91 assertEquals(Float.POSITIVE_INFINITY, toFloat(toHalf(Float.POSITIVE_INFINITY)), 1e-6f); in halfToSingle()
92 assertEquals(Float.NEGATIVE_INFINITY, toFloat(toHalf(Float.NEGATIVE_INFINITY)), 1e-6f); in halfToSingle()
94 assertEquals(1.0009765625f, toFloat(toHalf(1.0009765625f)), 1e-6f); in halfToSingle()
95 assertEquals(-2.0f, toFloat(toHalf(-2.0f)), 1e-6f); in halfToSingle()
[all …]
DSparseLongArrayTest.java19 import static org.junit.Assert.assertEquals;
45 assertEquals(0, sparseArray.size()); in testSparseArrayWithDefaultCapacity()
51 assertEquals(i + 1, sparseArray.size()); in testSparseArrayWithDefaultCapacity()
55 assertEquals(i, sparseArray.get(KEYS[i])); in testSparseArrayWithDefaultCapacity()
59 assertEquals(sparseArray.indexOfValue(VALUES[i]), sparseArray.indexOfKey(KEYS[i])); in testSparseArrayWithDefaultCapacity()
66 assertEquals(oldValue, sparseArray.get(existKey)); in testSparseArrayWithDefaultCapacity()
67 assertEquals(LENGTH, sparseArray.size()); in testSparseArrayWithDefaultCapacity()
69 assertEquals(newValue, sparseArray.get(existKey)); in testSparseArrayWithDefaultCapacity()
70 assertEquals(LENGTH, sparseArray.size()); in testSparseArrayWithDefaultCapacity()
72 assertEquals(VALUE_FOR_NON_EXISTED_KEY, in testSparseArrayWithDefaultCapacity()
[all …]
DSparseIntArrayTest.java19 import static org.junit.Assert.assertEquals;
41 assertEquals(0, sparseIntArray.size()); in testSparseIntArrayWithDefaultCapacity()
46 assertEquals(i + 1, sparseIntArray.size()); in testSparseIntArrayWithDefaultCapacity()
49 assertEquals(VALUES[i], sparseIntArray.get(KEYS[i])); in testSparseIntArrayWithDefaultCapacity()
52 assertEquals(sparseIntArray.indexOfValue(VALUES[i]), in testSparseIntArrayWithDefaultCapacity()
60 assertEquals(oldValue, sparseIntArray.get(existKey)); in testSparseIntArrayWithDefaultCapacity()
61 assertEquals(13, sparseIntArray.size()); in testSparseIntArrayWithDefaultCapacity()
63 assertEquals(newValue, sparseIntArray.get(existKey)); in testSparseIntArrayWithDefaultCapacity()
64 assertEquals(13, sparseIntArray.size()); in testSparseIntArrayWithDefaultCapacity()
66 assertEquals(VALUE_FOR_NON_EXISTED_KEY, in testSparseIntArrayWithDefaultCapacity()
[all …]
DSparseBooleanArrayTest.java19 import static org.junit.Assert.assertEquals;
42 assertEquals(0, sparseBooleanArray.size()); in testSparseBooleanArrayWithDefaultCapacity()
47 assertEquals(i + 1, sparseBooleanArray.size()); in testSparseBooleanArrayWithDefaultCapacity()
50 assertEquals(VALUES[i], sparseBooleanArray.get(KEYS[i])); in testSparseBooleanArrayWithDefaultCapacity()
58 assertEquals(VALUES[i], sparseBooleanArray.valueAt(keyIndex)); in testSparseBooleanArrayWithDefaultCapacity()
60 assertEquals(expectPos, sparseBooleanArray.indexOfValue(VALUES[i])); in testSparseBooleanArrayWithDefaultCapacity()
67 assertEquals(oldValue, sparseBooleanArray.get(existKey)); in testSparseBooleanArrayWithDefaultCapacity()
68 assertEquals(13, sparseBooleanArray.size()); in testSparseBooleanArrayWithDefaultCapacity()
70 assertEquals(newValue, sparseBooleanArray.get(existKey)); in testSparseBooleanArrayWithDefaultCapacity()
71 assertEquals(13, sparseBooleanArray.size()); in testSparseBooleanArrayWithDefaultCapacity()
[all …]
DXmlTest.java19 import static org.junit.Assert.assertEquals;
100 assertEquals(STR_SET_DOCUMENT_LOCATOR, dc.mVec.elementAt(0)); in testParseStringContentHandler()
101 assertEquals(STR_START_DOCUMENT, dc.mVec.elementAt(1)); in testParseStringContentHandler()
102 assertEquals(STR_START_ELEMENT, dc.mVec.elementAt(2)); in testParseStringContentHandler()
103 assertEquals(TAG_TEST, dc.mVec.elementAt(3)); in testParseStringContentHandler()
105 assertEquals(STR_0_NUMBER, dc.mVec.elementAt(5)); in testParseStringContentHandler()
106 assertEquals(STR_START_ELEMENT, dc.mVec.elementAt(6)); in testParseStringContentHandler()
107 assertEquals(TAG_SON, dc.mVec.elementAt(7)); in testParseStringContentHandler()
109 assertEquals(STR_1_NUMBER, dc.mVec.elementAt(9)); in testParseStringContentHandler()
110 assertEquals(ATT_NAME, dc.mVec.elementAt(10)); in testParseStringContentHandler()
[all …]
DLongSparseArrayTest.java19 import static org.junit.Assert.assertEquals;
47 assertEquals(0, sparseArray.size()); in testSparseArrayWithDefaultCapacity()
53 assertEquals(i + 1, sparseArray.size()); in testSparseArrayWithDefaultCapacity()
57 assertEquals(new Integer(i), sparseArray.get(KEYS[i])); in testSparseArrayWithDefaultCapacity()
61 assertEquals(sparseArray.indexOfValue(VALUES[i]), sparseArray.indexOfKey(KEYS[i])); in testSparseArrayWithDefaultCapacity()
68 assertEquals(oldValue, sparseArray.get(existKey)); in testSparseArrayWithDefaultCapacity()
69 assertEquals(LENGTH, sparseArray.size()); in testSparseArrayWithDefaultCapacity()
71 assertEquals(newValue, sparseArray.get(existKey)); in testSparseArrayWithDefaultCapacity()
72 assertEquals(LENGTH, sparseArray.size()); in testSparseArrayWithDefaultCapacity()
74 assertEquals(VALUE_FOR_NON_EXISTED_KEY, in testSparseArrayWithDefaultCapacity()
[all …]
/cts/tests/tests/telecom/src/android/telecom/cts/
DDataObjectUnitTests.java69 assertEquals(accountHandle, account.getAccountHandle()); in testPhoneAccount()
70 assertEquals(tel, account.getAddress()); in testPhoneAccount()
71 assertEquals(tel, account.getSubscriptionAddress()); in testPhoneAccount()
72 assertEquals(PhoneAccount.CAPABILITY_CALL_PROVIDER, account.getCapabilities()); in testPhoneAccount()
73 assertEquals(Color.RED, account.getHighlightColor()); in testPhoneAccount()
74 assertEquals(ACCOUNT_LABEL, account.getShortDescription()); in testPhoneAccount()
75 assertEquals(ACCOUNT_LABEL, account.getLabel()); in testPhoneAccount()
76 assertEquals(Arrays.asList("tel"), account.getSupportedUriSchemes()); in testPhoneAccount()
77 assertEquals(phoneIcon.toString(), account.getIcon().toString()); in testPhoneAccount()
78 assertEquals(0, account.describeContents()); in testPhoneAccount()
[all …]
/cts/tests/tests/print/src/android/print/cts/
DClassParametersTest.java21 import static org.junit.Assert.assertEquals;
107 assertEquals("testId", testResolution.getId()); in legalPrintAttributesResolution()
108 assertEquals("testLabel", testResolution.getLabel()); in legalPrintAttributesResolution()
109 assertEquals(1, testResolution.getHorizontalDpi()); in legalPrintAttributesResolution()
110 assertEquals(2, testResolution.getVerticalDpi()); in legalPrintAttributesResolution()
114 assertEquals("testId2", testResolution2.getId()); in legalPrintAttributesResolution()
115 assertEquals("testLabel2", testResolution2.getLabel()); in legalPrintAttributesResolution()
116 assertEquals(1, testResolution2.getHorizontalDpi()); in legalPrintAttributesResolution()
117 assertEquals(1, testResolution2.getVerticalDpi()); in legalPrintAttributesResolution()
122 assertEquals("testId3", testResolution3.getId()); in legalPrintAttributesResolution()
[all …]
/cts/tests/tests/identity/src/android/security/identity/cts/
DIdentityApiTest.java39 import static org.junit.Assert.assertEquals;
47 assertEquals("Message", e.getMessage()); in testConstructorsAlreadyPersonalizedException()
48 assertEquals(null, e.getCause()); in testConstructorsAlreadyPersonalizedException()
51 assertEquals("Message 2", e.getMessage()); in testConstructorsAlreadyPersonalizedException()
52 assertEquals(t, e.getCause()); in testConstructorsAlreadyPersonalizedException()
58 assertEquals("Message", e.getMessage()); in testConstructorsCipherSuiteNotSupportedException()
59 assertEquals(null, e.getCause()); in testConstructorsCipherSuiteNotSupportedException()
62 assertEquals("Message 2", e.getMessage()); in testConstructorsCipherSuiteNotSupportedException()
63 assertEquals(t, e.getCause()); in testConstructorsCipherSuiteNotSupportedException()
69 assertEquals("Message", e.getMessage()); in testConstructorsDocTypeNotSupportedException()
[all …]
/cts/tests/tests/text/src/android/text/method/cts/
DBackspaceTest.java71 state.assertEquals("|"); in testCRLF()
76 state.assertEquals("|"); in testCRLF()
80 state.assertEquals("|"); in testCRLF()
84 state.assertEquals("U+000A |"); in testCRLF()
86 state.assertEquals("|"); in testCRLF()
95 state.assertEquals("|"); in testSurrogatePairs()
99 state.assertEquals("U+1F441 |"); in testSurrogatePairs()
101 state.assertEquals("|"); in testSurrogatePairs()
111 state.assertEquals("'abc' ( 'de' ) 'f' |"); in testReplacementSpan()
113 state.assertEquals("'abc' ( 'de' ) |"); in testReplacementSpan()
[all …]

12345678910>>...84