/external/robolectric-shadows/robolectric/src/test/java/org/robolectric/shadows/ |
D | ShadowAbstractCursorTest.java | 19 private TestCursor cursor; field in ShadowAbstractCursorTest 23 cursor = new TestCursor(); in setUp() 28 cursor.theTable.add("Foobar"); in testMoveToFirst() 29 assertThat(cursor.moveToFirst()).isTrue(); in testMoveToFirst() 30 assertThat(cursor.getCount()).isEqualTo(1); in testMoveToFirst() 35 assertThat(cursor.moveToFirst()).isFalse(); in testMoveToFirstEmptyList() 36 assertThat(cursor.getCount()).isEqualTo(0); in testMoveToFirstEmptyList() 41 cursor.theTable.add("Foobar"); in testMoveToLast() 42 cursor.theTable.add("Bletch"); in testMoveToLast() 44 assertThat(cursor.moveToLast()).isTrue(); in testMoveToLast() [all …]
|
D | SQLiteCursorTest.java | 20 private Cursor cursor; field in SQLiteCursorTest 36 cursor = createCursor(); in setUp() 46 String[] columnNames = cursor.getColumnNames(); in testGetColumnNames() 54 String[] columnNames = cursor.getColumnNames(); in testGetColumnNamesEmpty() 63 assertThat(cursor.getColumnIndex("id")).isEqualTo(0); in testGetColumnIndex() 64 assertThat(cursor.getColumnIndex("name")).isEqualTo(1); in testGetColumnIndex() 69 assertThat(cursor.getColumnIndex("Fred")).isEqualTo(-1); in testGetColumnIndexNotFound() 76 assertThat(cursor.getColumnIndex("id")).isEqualTo(0); in testGetColumnIndexEmpty() 77 assertThat(cursor.getColumnIndex("name")).isEqualTo(1); in testGetColumnIndexEmpty() 82 assertThat(cursor.getColumnIndexOrThrow("id")).isEqualTo(0); in testGetColumnIndexOrThrow() [all …]
|
D | ShadowMatrixCursorTest.java | 29 MatrixCursor cursor = new MatrixCursor(new String[]{"a", "b", "c"}); in shouldAddObjectArraysAsRows() local 30 cursor.addRow(new Object[]{"foo", 10L, 0.1f}); in shouldAddObjectArraysAsRows() 31 cursor.addRow(new Object[]{"baz", 20L, null}); in shouldAddObjectArraysAsRows() 32 assertThat(cursor.getCount()).isEqualTo(2); in shouldAddObjectArraysAsRows() 34 assertTrue(cursor.moveToFirst()); in shouldAddObjectArraysAsRows() 36 assertThat(cursor.getString(0)).isEqualTo("foo"); in shouldAddObjectArraysAsRows() 37 assertThat(cursor.getLong(1)).isEqualTo(10L); in shouldAddObjectArraysAsRows() 38 assertThat(cursor.getFloat(2)).isEqualTo(0.1f); in shouldAddObjectArraysAsRows() 40 assertTrue(cursor.moveToNext()); in shouldAddObjectArraysAsRows() 42 assertThat(cursor.getString(0)).isEqualTo("baz"); in shouldAddObjectArraysAsRows() [all …]
|
D | ShadowMergeCursorTest.java | 18 private MergeCursor cursor; field in ShadowMergeCursorTest 64 Cursor cursor = database.rawQuery(selectSql, null); in setupTable() local 65 assertThat(cursor).isInstanceOf(SQLiteCursor.class); in setupTable() 67 return (SQLiteCursor) cursor; in setupTable() 78 cursor = new MergeCursor( new Cursor[1] ); in testEmptyCursors() 79 assertThat(cursor.getCount()).isEqualTo(0); in testEmptyCursors() 80 assertThat(cursor.moveToFirst()).isFalse(); in testEmptyCursors() 81 assertThat(cursor.getColumnNames()).isNotNull(); in testEmptyCursors() 87 cursor = new MergeCursor( cursors ); in testEmptyCursors() 88 assertThat(cursor.getCount()).isEqualTo(TABLE_1_INSERTS.length); in testEmptyCursors() [all …]
|
D | SQLiteDatabaseTest.java | 107 …Cursor cursor = database.query("table_name", new String[]{"second_column", "first_column"}, null, … in testInsertAndQuery() local 109 assertThat(cursor.moveToFirst()).isTrue(); in testInsertAndQuery() 111 byte[] byteValueFromDatabase = cursor.getBlob(0); in testInsertAndQuery() 112 String stringValueFromDatabase = cursor.getString(1); in testInsertAndQuery() 130 … Cursor cursor = database.rawQuery("select second_column, first_column from table_name", null); in testInsertAndRawQuery() local 132 assertThat(cursor.moveToFirst()).isTrue(); in testInsertAndRawQuery() 134 byte[] byteValueFromDatabase = cursor.getBlob(0); in testInsertAndRawQuery() 135 String stringValueFromDatabase = cursor.getString(1); in testInsertAndRawQuery() 159 … Cursor cursor = database.rawQuery("select second_column, first_column from table_name", null); in testInsertOrThrow() local 160 assertThat(cursor.moveToFirst()).isTrue(); in testInsertOrThrow() [all …]
|
D | ShadowDownloadManagerTest.java | 107 Cursor cursor = manager.query(new DownloadManager.Query().setFilterById(id)); in query_shouldReturnCursor() local 108 assertThat(cursor.getCount()).isEqualTo(1); in query_shouldReturnCursor() 109 assertThat(cursor.moveToNext()).isTrue(); in query_shouldReturnCursor() 116 Cursor cursor = manager.query(new DownloadManager.Query().setFilterById(id)); in query_shouldReturnColumnIndexes() local 118 assertThat(cursor.getColumnIndex(DownloadManager.COLUMN_URI)).isAtLeast(0); in query_shouldReturnColumnIndexes() 119 assertThat(cursor.getColumnIndex(DownloadManager.COLUMN_LOCAL_URI)).isAtLeast(0); in query_shouldReturnColumnIndexes() 120 assertThat(cursor.getColumnIndex(DownloadManager.COLUMN_LOCAL_FILENAME)).isAtLeast(0); in query_shouldReturnColumnIndexes() 121 assertThat(cursor.getColumnIndex(DownloadManager.COLUMN_DESCRIPTION)).isAtLeast(0); in query_shouldReturnColumnIndexes() 122 assertThat(cursor.getColumnIndex(DownloadManager.COLUMN_REASON)).isAtLeast(0); in query_shouldReturnColumnIndexes() 123 assertThat(cursor.getColumnIndex(DownloadManager.COLUMN_STATUS)).isAtLeast(0); in query_shouldReturnColumnIndexes() [all …]
|
/external/robolectric-shadows/robolectric/src/test/java/org/robolectric/fakes/ |
D | RoboCursorTest.java | 29 private final RoboCursor cursor = new RoboCursor(); field in RoboCursorTest 35 shadowOf(contentResolver).setCursor(uri, cursor); in setup() 37 cursor.setColumnNames(asList( in setup() 52 assertThat(cursor.uri).isEqualTo(uri); in query_shouldMakeQueryParamsAvailable() 53 assertThat(cursor.projection[0]).isEqualTo("projection"); in query_shouldMakeQueryParamsAvailable() 54 assertThat(cursor.selection).isEqualTo("selection"); in query_shouldMakeQueryParamsAvailable() 55 assertThat(cursor.selectionArgs[0]).isEqualTo("selection"); in query_shouldMakeQueryParamsAvailable() 56 assertThat(cursor.sortOrder).isEqualTo("sortOrder"); in query_shouldMakeQueryParamsAvailable() 61 RoboCursor cursor = new RoboCursor(); in getColumnCount_whenSetColumnNamesHasntBeenCalled_shouldReturnCountFromData() local 62 cursor.setResults(new Object[][]{ in getColumnCount_whenSetColumnNamesHasntBeenCalled_shouldReturnCountFromData() [all …]
|
/external/libdrm/tests/modetest/ |
D | cursor.c | 44 struct cursor { struct 57 static struct cursor cursors[MAX_CURSORS]; argument 69 void (*run)(struct cursor *cursor, const struct cursor_step *step); 77 static void set_cursor(struct cursor *cursor, const struct cursor_step *step) in set_cursor() argument 83 handle = cursor->bo_handle; in set_cursor() 85 cursor->enabled = enabled; in set_cursor() 87 drmModeSetCursor(cursor->fd, cursor->crtc_id, handle, cursor->w, cursor->h); in set_cursor() 90 static void move_cursor(struct cursor *cursor, const struct cursor_step *step) in move_cursor() argument 92 int x = cursor->x; in move_cursor() 93 int y = cursor->y; in move_cursor() [all …]
|
/external/google-breakpad/src/common/ |
D | byte_cursor_unittest.cc | 61 ByteCursor cursor(&buffer); in TEST() local 62 EXPECT_EQ(0U, cursor.Available()); in TEST() 68 ByteCursor cursor(&buffer); in TEST() local 69 EXPECT_TRUE(cursor.AtEnd()); in TEST() 75 ByteCursor cursor(&buffer); in TEST() local 76 EXPECT_TRUE(cursor); in TEST() 82 ByteCursor cursor(&buffer); in TEST() local 83 EXPECT_EQ(10U, cursor.Available()); in TEST() 89 ByteCursor cursor(&buffer); in TEST() local 90 EXPECT_FALSE(cursor.AtEnd()); in TEST() [all …]
|
/external/wayland/cursor/ |
D | wayland-cursor.c | 149 struct cursor { struct 150 struct wl_cursor cursor; member 190 wl_cursor_destroy(struct wl_cursor *cursor) in wl_cursor_destroy() argument 194 for (i = 0; i < cursor->image_count; i++) in wl_cursor_destroy() 195 wl_cursor_image_destroy(cursor->images[i]); in wl_cursor_destroy() 197 free(cursor->images); in wl_cursor_destroy() 198 free(cursor->name); in wl_cursor_destroy() 199 free(cursor); in wl_cursor_destroy() 208 struct cursor *cursor; in wl_cursor_create_from_data() local 212 cursor = malloc(sizeof *cursor); in wl_cursor_create_from_data() [all …]
|
/external/jacoco/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/ |
D | AbstractMatcher.java | 28 AbstractInsnNode cursor; field in AbstractMatcher 35 cursor = methodNode.instructions.getFirst(); in firstIsALoad0() 37 if (cursor.getOpcode() == Opcodes.ALOAD in firstIsALoad0() 38 && ((VarInsnNode) cursor).var == 0) { in firstIsALoad0() 41 cursor = null; in firstIsALoad0() 50 if (cursor == null) { in nextIsType() 53 if (((TypeInsnNode) cursor).desc.equals(desc)) { in nextIsType() 56 cursor = null; in nextIsType() 67 if (cursor == null) { in nextIsInvoke() 70 final MethodInsnNode m = (MethodInsnNode) cursor; in nextIsInvoke() [all …]
|
D | TryWithResourcesEcjFilter.java | 62 cursor = start.getPrevious(); in start() 76 c = cursor; in matchEcj() 83 c = cursor; in matchEcj() 85 cursor = c; in matchEcj() 90 if (cursor == null) { in matchEcj() 93 final AbstractInsnNode end = cursor; in matchEcj() 96 cursor = startOnNonExceptionalPath; in matchEcj() 100 cursor = startOnNonExceptionalPath; in matchEcj() 101 if (cursor == null) { in matchEcj() 108 if (cursor == null || cursor.getOpcode() != Opcodes.GOTO) { in matchEcj() [all …]
|
D | KotlinCoroutineFilter.java | 51 cursor = methodNode.instructions.getFirst(); in match() 56 if (cursor == null) { in match() 57 cursor = skipNonOpcodes(methodNode.instructions.getFirst()); in match() 70 if (cursor == null) { in match() 73 final TableSwitchInsnNode s = (TableSwitchInsnNode) cursor; in match() 80 if (cursor == null) { in match() 84 ignore.add(cursor); in match() 87 for (AbstractInsnNode i = cursor; i != null in match() 89 cursor = i; in match() 92 if (cursor == null) { in match() [all …]
|
D | TryWithResourcesJavac11Filter.java | 73 cursor = start.getPrevious(); in match() 84 if (cursor == null) { in match() 87 final AbstractInsnNode end = cursor; in match() 90 cursor = start.getPrevious(); in match() 93 cursor = s; in match() 94 if (cursor == null) { in match() 100 final AbstractInsnNode m = cursor; in match() 102 if (cursor.getOpcode() != Opcodes.GOTO) { in match() 103 cursor = m; in match() 106 output.ignore(s, cursor); in match() [all …]
|
/external/jacoco/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/ |
D | AbstractMatcherTest.java | 44 matcher.cursor = m.instructions.getFirst(); in skipNonOpcodes() 46 assertSame(m.instructions.getLast(), matcher.cursor); in skipNonOpcodes() 50 assertSame(m.instructions.getLast(), matcher.cursor); in skipNonOpcodes() 53 matcher.cursor = null; in skipNonOpcodes() 63 matcher.cursor = m.instructions.getFirst(); in nextIs() 65 assertNull(matcher.cursor); in nextIs() 68 matcher.cursor = m.instructions.getFirst(); in nextIs() 70 assertSame(m.instructions.getLast(), matcher.cursor); in nextIs() 73 matcher.cursor = null; in nextIs() 82 matcher.cursor = m.instructions.getFirst(); in nextIsSwitch() [all …]
|
/external/clang/test/Index/ |
D | get-cursor-macro-args.m | 2 // RUN: c-index-test -cursor-at=%S/get-cursor-macro-args.h:9:12 \ 3 // RUN: -cursor-at=%S/get-cursor-macro-args.h:9:21 \ 4 // RUN: -cursor-at=%S/get-cursor-macro-args.h:9:9 \ 5 // RUN: -cursor-at=%S/get-cursor-macro-args.h:9:22 \ 6 // RUN: -cursor-at=%S/get-cursor-macro-args.h:15:12 \ 7 // RUN: -cursor-at=%S/get-cursor-macro-args.h:15:20 \ 8 // RUN: %s -include %S/get-cursor-macro-args.h | FileCheck %s 11 // RUN: c-index-test -write-pch %t.pch -x objective-c-header %S/get-cursor-macro-args.h 12 // RUN: c-index-test -cursor-at=%S/get-cursor-macro-args.h:9:12 \ 13 // RUN: -cursor-at=%S/get-cursor-macro-args.h:9:21 \ [all …]
|
/external/libunwind/src/ia64/ |
D | mk_Gcursor_i.c | 42 OFFSET("IP_OFF", offsetof (struct cursor, ip)); in main() 43 OFFSET("PR_OFF", offsetof (struct cursor, pr)); in main() 44 OFFSET("BSP_OFF", offsetof (struct cursor, bsp)); in main() 45 OFFSET("PSP_OFF", offsetof (struct cursor, psp)); in main() 46 OFFSET("PFS_LOC_OFF", offsetof (struct cursor, loc[IA64_REG_PFS])); in main() 47 OFFSET("RNAT_LOC_OFF", offsetof (struct cursor, loc[IA64_REG_RNAT])); in main() 48 OFFSET("UNAT_LOC_OFF", offsetof (struct cursor, loc[IA64_REG_UNAT])); in main() 49 OFFSET("LC_LOC_OFF", offsetof (struct cursor, loc[IA64_REG_LC])); in main() 50 OFFSET("FPSR_LOC_OFF", offsetof (struct cursor, loc[IA64_REG_FPSR])); in main() 51 OFFSET("B1_LOC_OFF", offsetof (struct cursor, loc[IA64_REG_B1])); in main() [all …]
|
/external/libunwind_llvm/src/ |
D | libunwind.cpp | 38 _LIBUNWIND_EXPORT int unw_init_local(unw_cursor_t *cursor, in unw_init_local() argument 41 static_cast<void *>(cursor), in unw_init_local() 69 new (reinterpret_cast<UnwindCursor<LocalAddressSpace, REGISTER_KIND> *>(cursor)) in unw_init_local() 73 AbstractUnwindCursor *co = (AbstractUnwindCursor *)cursor; in unw_init_local() 80 _LIBUNWIND_EXPORT int unw_get_reg(unw_cursor_t *cursor, unw_regnum_t regNum, in unw_get_reg() argument 83 static_cast<void *>(cursor), regNum, in unw_get_reg() 85 AbstractUnwindCursor *co = (AbstractUnwindCursor *)cursor; in unw_get_reg() 95 _LIBUNWIND_EXPORT int unw_set_reg(unw_cursor_t *cursor, unw_regnum_t regNum, in unw_set_reg() argument 98 static_cast<void *>(cursor), regNum, value); in unw_set_reg() 100 AbstractUnwindCursor *co = (AbstractUnwindCursor *)cursor; in unw_set_reg() [all …]
|
D | UnwindLevel1.c | 37 unwind_phase1(unw_context_t *uc, unw_cursor_t *cursor, _Unwind_Exception *exception_object) { in unwind_phase1() argument 38 unw_init_local(cursor, uc); in unwind_phase1() 45 int stepResult = unw_step(cursor); in unwind_phase1() 61 if (unw_get_proc_info(cursor, &frameInfo) != UNW_ESUCCESS) { in unwind_phase1() 73 if ((unw_get_proc_name(cursor, functionBuf, sizeof(functionBuf), in unwind_phase1() 78 unw_get_reg(cursor, UNW_REG_IP, &pc); in unwind_phase1() 96 exception_object, (struct _Unwind_Context *)(cursor)); in unwind_phase1() 102 unw_get_reg(cursor, UNW_REG_SP, &sp); in unwind_phase1() 130 unwind_phase2(unw_context_t *uc, unw_cursor_t *cursor, _Unwind_Exception *exception_object) { in unwind_phase2() argument 131 unw_init_local(cursor, uc); in unwind_phase2() [all …]
|
/external/apache-http/src/org/apache/http/message/ |
D | BasicHeaderValueParser.java | 112 ParserCursor cursor = new ParserCursor(0, value.length()); in parseElements() local 113 return parser.parseElements(buffer, cursor); in parseElements() 119 final ParserCursor cursor) { in parseElements() argument 124 if (cursor == null) { in parseElements() 129 while (!cursor.atEnd()) { in parseElements() 130 HeaderElement element = parseHeaderElement(buffer, cursor); in parseElements() 163 ParserCursor cursor = new ParserCursor(0, value.length()); in parseHeaderElement() local 164 return parser.parseHeaderElement(buffer, cursor); in parseHeaderElement() 170 final ParserCursor cursor) { in parseHeaderElement() argument 175 if (cursor == null) { in parseHeaderElement() [all …]
|
D | BasicLineParser.java | 127 ParserCursor cursor = new ParserCursor(0, value.length()); in parseProtocolVersion() local 128 return parser.parseProtocolVersion(buffer, cursor); in parseProtocolVersion() 134 final ParserCursor cursor) in parseProtocolVersion() argument 140 if (cursor == null) { in parseProtocolVersion() 147 int indexFrom = cursor.getPos(); in parseProtocolVersion() 148 int indexTo = cursor.getUpperBound(); in parseProtocolVersion() 150 skipWhitespace(buffer, cursor); in parseProtocolVersion() 152 int i = cursor.getPos(); in parseProtocolVersion() 206 cursor.updatePos(blank); in parseProtocolVersion() 230 final ParserCursor cursor) { in hasProtocolVersion() argument [all …]
|
/external/u-boot/tools/ |
D | asn1_compiler.c | 806 struct token *cursor; in parse() local 812 cursor = type->name; in parse() 814 if (cursor[0].token_type != TOKEN_TYPE_NAME || in parse() 815 cursor[1].token_type != TOKEN_ASSIGNMENT) in parse() 817 cursor += 2; in parse() 819 type->element = parse_type(&cursor, type[1].name, NULL); in parse() 822 if (cursor != type[1].name) { in parse() 824 filename, cursor->line, cursor->content); in parse() 858 struct token *cursor = *_cursor; in parse_type() local 863 top = element = alloc_elem(cursor); in parse_type() [all …]
|
/external/sl4a/Common/src/com/googlecode/android_scripting/facade/ |
D | ContactsFacade.java | 109 Cursor cursor = mService.getContentResolver().query(phoneData, null, null, null, null); in contactsDisplayPhonePickList() local 110 if (cursor != null) { in contactsDisplayPhonePickList() 111 if (cursor.moveToFirst()) { in contactsDisplayPhonePickList() 113 cursor.getString(cursor.getColumnIndexOrThrow(ContactsContract.PhoneLookup.NUMBER)); in contactsDisplayPhonePickList() 115 cursor.close(); in contactsDisplayPhonePickList() 124 Cursor cursor = mContentResolver.query(CONTACTS_URI, null, null, null, null); in contactsGetAttributes() local 125 if (cursor != null) { in contactsGetAttributes() 126 String[] columns = cursor.getColumnNames(); in contactsGetAttributes() 130 cursor.close(); in contactsGetAttributes() 139 Cursor cursor = mContentResolver.query(CONTACTS_URI, columns, null, null, null); in contactsGetContactIds() local [all …]
|
/external/ims/rcs/presencepolling/src/com/android/service/ims/presence/ |
D | EABProvider.java | 290 Cursor cursor = db.rawQuery(rawquery, null); in queryInternal() local 291 if (cursor != null && cursor.moveToFirst()) { in queryInternal() 294 String contactId = cursor.getString(cursor in queryInternal() 297 } while (cursor.moveToNext()); in queryInternal() 299 if (cursor != null) cursor.close(); in queryInternal() 428 Cursor cursor = getContext().getContentResolver().query(EABContract.EABColumns.CONTENT_URI, in verifyIfMdnExists() local 430 if ((null != cursor) && (cursor.getCount() > 0)) { in verifyIfMdnExists() 431 logger.debug("Cursor count is " + cursor.getCount()); in verifyIfMdnExists() 433 while (cursor.moveToNext()) { in verifyIfMdnExists() 435 String eabFormattedNumber = cursor.getString( in verifyIfMdnExists() [all …]
|
/external/clang/tools/libclang/ |
D | CIndexHigh.cpp | 147 static enum CXChildVisitResult findFileIdRefVisit(CXCursor cursor, in findFileIdRefVisit() argument 150 CXCursor declCursor = clang_getCursorReferenced(cursor); in findFileIdRefVisit() 160 cursor = cxcursor::getSelectorIdentifierCursor(data->SelectorIdIdx, cursor); in findFileIdRefVisit() 164 if ((cursor.kind == CXCursor_ObjCClassMethodDecl || in findFileIdRefVisit() 165 cursor.kind == CXCursor_ObjCInstanceMethodDecl) && in findFileIdRefVisit() 166 cxcursor::getSelectorIdentifierIndex(cursor) == -1) in findFileIdRefVisit() 169 if (clang_isExpression(cursor.kind)) { in findFileIdRefVisit() 170 if (cursor.kind == CXCursor_DeclRefExpr || in findFileIdRefVisit() 171 cursor.kind == CXCursor_MemberRefExpr) { in findFileIdRefVisit() 174 } else if (cursor.kind == CXCursor_ObjCMessageExpr && in findFileIdRefVisit() [all …]
|