Home
last modified time | relevance | path

Searched refs:string (Results 1 – 25 of 60) sorted by relevance

123

/cts/tests/tests/content/src/android/content/res/cts/
DPrimitiveTest.java94 expected, v.string); in tryString()
99 tryString(R.string.coerceIntegerToString, "100"); in testStringCoerce()
100 tryString(R.string.coerceBooleanToString, "true"); in testStringCoerce()
101 tryString(R.string.coerceColorToString, "#fff"); in testStringCoerce()
102 tryString(R.string.coerceFloatToString, "100.0"); in testStringCoerce()
103 tryString(R.string.coerceDimensionToString, "100px"); in testStringCoerce()
104 tryString(R.string.coerceFractionToString, "100%"); in testStringCoerce()
116 checkString(R.string.formattedStringNone, in testFormattedString()
117 mResources.getString(R.string.formattedStringNone), in testFormattedString()
119 checkString(R.string.formattedStringOne, in testFormattedString()
[all …]
DResourcesTest.java117 final String strGo = mResources.getString(R.string.go, "%1$s%%", 12); in testGetString()
159 final TypedArray ta = mResources.obtainTypedArray(R.array.string); in testObtainTypedArray()
749 checkString(R.string.formattedStringNone, in testGetStringWithIntParam()
750 mResources.getString(R.string.formattedStringNone), in testGetStringWithIntParam()
752 checkString(R.string.formattedStringOne, in testGetStringWithIntParam()
753 mResources.getString(R.string.formattedStringOne), in testGetStringWithIntParam()
755 checkString(R.string.formattedStringTwo, mResources.getString(R.string.formattedStringTwo), in testGetStringWithIntParam()
758 checkString(R.string.formattedStringNone, in testGetStringWithIntParam()
759 mResources.getString(R.string.formattedStringNone), in testGetStringWithIntParam()
761 checkString(R.string.formattedStringOne, in testGetStringWithIntParam()
[all …]
/cts/tools/vm-tests/src/dot/junit/opcodes/return_object/d/
DT_return_object_6.d30 const-string v0, "aaa"
31 const-string v1, "bbb"
32 const-string v2, "ccc"
33 const-string v3, "ddd"
39 const-string v1, "a"
40 const-string v2, "b"
41 const-string v3, "c"
45 const-string v8, "ddd"
48 const-string v7, "a"
51 const-string v7, "b"
[all …]
/cts/tests/tests/graphics/src/android/graphics/cts/
DPaintTest.java149 String string = "HIJKLMN"; in testBreakText2() local
153 assertEquals(7, p.breakText(string, 0, 7, true, 50.0f, f)); in testBreakText2()
155 assertEquals(6, p.breakText(string, 0, 7, true, 40.0f, f)); in testBreakText2()
157 assertEquals(7, p.breakText(string, 0, 7, false, 50.0f, f)); in testBreakText2()
160 for (int i = 0; i < string.length(); i++) { in testBreakText2()
161 assertEquals(1, p.breakText(string, i, i + 1, true, 20.0f, f)); in testBreakText2()
165 assertEquals(4, p.breakText(string, 0, 4, true, 30.0f, f)); in testBreakText2()
167 assertEquals(3, p.breakText(string, 0, 3, true, 30.0f, f)); in testBreakText2()
169 assertEquals(2, p.breakText(string, 0, 2, true, 30.0f, f)); in testBreakText2()
171 assertEquals(1, p.breakText(string, 0, 1, true, 30.0f, f)); in testBreakText2()
[all …]
/cts/tests/tests/widget/src/android/widget/cts/
DEditTextTest.java141 String string = "android"; in testSetSelectionIndex() local
142 editText.setText(string, BufferType.EDITABLE); in testSetSelectionIndex()
161 editText.setSelection(string.length() + 1); in testSetSelectionIndex()
177 String string = "android"; in testSetSelectionStartstop() local
178 editText.setText(string, BufferType.EDITABLE); in testSetSelectionStartstop()
205 editText.setSelection(5, string.length() + 1); in testSetSelectionStartstop()
221 String string = "android"; in testSelectAll() local
222 editText.setText(string, BufferType.EDITABLE); in testSelectAll()
225 assertEquals(string.length(), editText.getSelectionEnd()); in testSelectAll()
DTableRowTest.java124 assertEquals(resources.getString(R.string.table_layout_first), in testGetVirtualChildAt()
126 assertEquals(resources.getString(R.string.table_layout_second), in testGetVirtualChildAt()
128 assertEquals(resources.getString(R.string.table_layout_third), in testGetVirtualChildAt()
136 assertEquals(resources.getString(R.string.table_layout_long), in testGetVirtualChildAt()
138 assertEquals(resources.getString(R.string.table_layout_second), in testGetVirtualChildAt()
140 assertEquals(resources.getString(R.string.table_layout_second), in testGetVirtualChildAt()
142 assertEquals(resources.getString(R.string.table_layout_third), in testGetVirtualChildAt()
DSpinnerTest.java78 assertEquals(mTargetContext.getString(R.string.text_view_hello), spinner.getPrompt()); in testConstructor()
94 com.android.cts.stub.R.array.string, android.R.layout.simple_spinner_item); in testGetBaseline()
199 spinner.setPromptId(R.string.hello_world); in testsetPromptId()
200 assertEquals(mTargetContext.getString(R.string.hello_world), spinner.getPrompt()); in testsetPromptId()
DLinearLayoutTest.java226 assertEquals(mContext.getResources().getString(R.string.horizontal_text_1), in testAccessWeightSum()
228 assertEquals(mContext.getResources().getString(R.string.horizontal_text_2), in testAccessWeightSum()
230 assertEquals(mContext.getResources().getString(R.string.horizontal_text_3), in testAccessWeightSum()
377 assertEquals(mContext.getResources().getString(R.string.horizontal_text_1), in testLayoutHorizontal()
379 assertEquals(mContext.getResources().getString(R.string.horizontal_text_2), in testLayoutHorizontal()
381 assertEquals(mContext.getResources().getString(R.string.horizontal_text_3), in testLayoutHorizontal()
472 assertEquals(mContext.getResources().getString(R.string.vertical_text_1), in testLayoutVertical()
474 assertEquals(mContext.getResources().getString(R.string.vertical_text_2), in testLayoutVertical()
476 assertEquals(mContext.getResources().getString(R.string.vertical_text_3), in testLayoutVertical()
DToastTest.java466 mToast = Toast.makeText(mActivity, R.string.hello_world, Toast.LENGTH_LONG);
473 mToast = Toast.makeText(mActivity, R.string.hello_android, Toast.LENGTH_SHORT);
480 mToast = Toast.makeText(null, R.string.hello_android, Toast.LENGTH_SHORT);
496 mToast = Toast.makeText(mActivity, R.string.text, Toast.LENGTH_LONG);
498 mToast.setText(R.string.hello_world);
501 mToast.setText(R.string.hello_android);
521 mToast = Toast.makeText(mActivity, R.string.text, Toast.LENGTH_LONG);
DAbsSpinnerTest.java120 com.android.cts.stub.R.array.string, android.R.layout.simple_spinner_item); in testSetSelectionIntBoolean()
153 com.android.cts.stub.R.array.string, android.R.layout.simple_spinner_item); in testSetSelectionInt()
191 com.android.cts.stub.R.array.string, android.R.layout.simple_spinner_item); in testAccessAdapter()
238 com.android.cts.stub.R.array.string, android.R.layout.simple_spinner_item); in testGetCount()
339 com.android.cts.stub.R.array.string, android.R.layout.simple_spinner_item); in testOnSaveAndRestoreInstanceState()
DTwoLineListItemTest.java127 assertEquals(res.getString(R.string.twolinelistitem_test_text1), in testGetTexts()
130 assertEquals(res.getString(R.string.twolinelistitem_test_text2), in testGetTexts()
/cts/tests/src/android/app/cts/
DDialogStubActivity.java187 mAlertDialog.setButton(getString(R.string.alert_dialog_positive), positiveMessage); in onCreateDialog()
188 mAlertDialog.setButton2(getString(R.string.alert_dialog_negative), negativeMessage); in onCreateDialog()
189 mAlertDialog.setButton3(getString(R.string.alert_dialog_neutral), neutralMessage); in onCreateDialog()
251 mAlertDialog.setButton(getString(R.string.alert_dialog_positive), positiveListener); in getAlertDialogInstance()
252 mAlertDialog.setButton2(getString(R.string.alert_dialog_negative), netativeListener); in getAlertDialogInstance()
253 mAlertDialog.setButton3(getString(R.string.alert_dialog_neutral), neutralListener); in getAlertDialogInstance()
256 getString(R.string.alert_dialog_positive), positiveListener); in getAlertDialogInstance()
258 getString(R.string.alert_dialog_negative), netativeListener); in getAlertDialogInstance()
260 getString(R.string.alert_dialog_neutral), neutralListener); in getAlertDialogInstance()
/cts/tests/tests/content/src/android/content/cts/
DContextTest.java66 String testString = mContext.getString(R.string.context_test_string1); in testGetString()
69 testString = mContext.getString(R.string.context_test_string1, "expected"); in testGetString()
72 testString = mContext.getString(R.string.context_test_string2); in testGetString()
98 CharSequence testCharSequence = mContext.getText(R.string.context_test_string2); in testGetText()
DIntent_ShortcutIconResourceTest.java36 final int resourceId = com.android.cts.stub.R.string.notify;
85 com.android.cts.stub.R.string.notify); in testWriteToParcel()
/cts/tests/tests/view/src/android/view/cts/
DView_IdsTest.java68 assertEquals(activity.getString(R.string.id_ok), buttonOk.getText().toString()); in testIds()
69 assertEquals(activity.getString(R.string.id_cancel), buttonCancel.getText().toString()); in testIds()
/cts/tests/tests/app/src/android/app/cts/
DAlertDialogTest.java130 assertEquals(mActivity.getString(com.android.cts.stub.R.string.alert_dialog_positive), in doTestAlertDialog()
135 assertEquals(mActivity.getString(com.android.cts.stub.R.string.alert_dialog_neutral), in doTestAlertDialog()
140 assertEquals(mActivity.getString(com.android.cts.stub.R.string.alert_dialog_negative), in doTestAlertDialog()
303 assertEquals(mActivity.getString(com.android.cts.stub.R.string.alert_dialog_positive), in testAlertDialogDeprecatedAPIWithMessage()
308 assertEquals(mActivity.getString(com.android.cts.stub.R.string.alert_dialog_negative), in testAlertDialogDeprecatedAPIWithMessage()
313 assertEquals(mActivity.getString(com.android.cts.stub.R.string.alert_dialog_neutral), in testAlertDialogDeprecatedAPIWithMessage()
DAlertDialog_BuilderTest.java181 mBuilder.setTitle(R.string.am); in testSetTitleWithParamInt()
187 assertEquals(mTitleView.getText(), mContext.getText(R.string.am)); in testSetTitleWithParamInt()
217 mBuilder.setMessage(R.string.am); in testSetMessageWithParamInt()
223 assertEquals(mMessageView.getText(), mContext.getText(R.string.am)); in testSetMessageWithParamInt()
287 mBuilder.setPositiveButton(R.string.year, mOnClickListener); in testSetPositiveButtonWithParamInt()
295 assertEquals(mContext.getText(R.string.year), mButton.getText()); in testSetPositiveButtonWithParamInt()
308 mBuilder.setPositiveButton(R.string.year, mOnClickListener); in testSetPositiveButtonWithParamCharSequence()
315 assertEquals(mContext.getText(R.string.year), mButton.getText()); in testSetPositiveButtonWithParamCharSequence()
348 mBuilder.setNegativeButton(com.android.cts.stub.R.string.notify, mOnClickListener); in testSetNegativeButtonWithParamInt()
355 assertEquals(mContext.getText(com.android.cts.stub.R.string.notify), mButton.getText()); in testSetNegativeButtonWithParamInt()
[all …]
/cts/tools/signature-tools/src/signature/converter/dex/
DDexUtil.java288 for (String string : split) { in splitTypeList()
289 separateTypes.add(string + ";");// add semicolon again in splitTypeList()
404 for (DexEncodedValue string : values) { in concatEncodedValues()
405 builder.append(string.getValue()); in concatEncodedValues()
495 for (DexEncodedValue string : enclosedClasses) { in getMemberClassNames()
496 enclosedClassesNames.add((String) string.getValue()); in getMemberClassNames()
/cts/tests/tests/util/src/android/util/cts/
DTypedValueTest.java95 tv1.string = "test"; in testSetTo()
104 assertEquals("test", tv2.string); in testSetTo()
183 tv.string = "test"; in testToString()
231 tv.string = "test"; in testCoerceToString1()
DStateSetTest.java69 String string = StateSet.dump(stateSet); in testDump() local
70 assertEquals("W P S F E ", string); in testDump()
/cts/tests/tests/text/src/android/text/cts/
DTextUtilsTest.java591 String string = "same object"; in testEquals() local
592 assertTrue(TextUtils.equals(string, string)); in testEquals()
624 assertFalse(TextUtils.equals(null, string)); in testEquals()
2004 String string = "String"; in testSubString() local
2005 assertSame(string, TextUtils.substring(string, 0, string.length())); in testSubString()
2006 assertEquals("Strin", TextUtils.substring(string, 0, string.length() - 1)); in testSubString()
2007 assertEquals("", TextUtils.substring(string, 1, 1)); in testSubString()
2010 TextUtils.substring(string, string.length(), 0); in testSubString()
2017 TextUtils.substring(string, -1, string.length()); in testSubString()
2024 TextUtils.substring(string, Integer.MAX_VALUE, string.length()); in testSubString()
[all …]
/cts/tests/tests/content/src/android/content/pm/cts/
DApplicationInfoTest.java158 mApplicationInfo.descriptionRes = R.string.hello_world; in testLoadDescription()
160 assertEquals(mContext.getResources().getString(R.string.hello_world), in testLoadDescription()
/cts/tools/vm-tests/src/dot/junit/opcodes/const_string/d/
DT_const_string_5.d30 const-string v254, "android"
DT_const_string_3.d30 const-string v3, "abc"
/cts/tools/vm-tests/src/dot/junit/opcodes/const_string_jumbo/d/
DT_const_string_jumbo_4.d30 const-string/jumbo v1, "abc jumbo"

123