Lines Matching defs:array
117 fprintf(stdout, "array count %d = %d %s\n", count, aExpectedCount,
140 nsISupportsArray* array;
143 if (NS_OK == (rv = NS_NewISupportsArray(&array))) {
144 FillArray(array, 10);
147 DumpArray(array, 10, fillResult, 10);
150 IFoo* foo = (IFoo*)array->ElementAt(3);
152 array->InsertElementAt(foo, 5);
155 DumpArray(array, 11, insertResult, 10);
157 array->InsertElementAt(foo, 0);
159 DumpArray(array, 12, insertResult2, 10);
161 array->AppendElement(foo);
163 DumpArray(array, 13, appendResult, 10);
169 PRInt32 index = array->IndexOf(foo);
174 index = array->IndexOfStartingAt(foo, index + 1);
179 index = array->LastIndexOf(foo);
186 array->ReplaceElementAt(foo, 8);
188 DumpArray(array, 13, replaceResult, 9);
192 array->RemoveElementAt(0);
194 DumpArray(array, 12, removeResult, 9);
196 array->RemoveElementAt(7);
198 DumpArray(array, 11, removeResult2, 9);
200 array->RemoveElement(foo);
202 DumpArray(array, 10, removeResult3, 9);
204 array->RemoveLastElement(foo);
206 DumpArray(array, 9, removeResult4, 9);
209 fprintf(stdout, "clear array:\n");
210 array->Clear();
211 DumpArray(array, 0, 0, 0);
213 FillArray(array, 4);
214 DumpArray(array, 4, fillResult, 4);
217 fprintf(stdout, "compact array:\n");
218 array->Compact();
219 DumpArray(array, 4, fillResult, 4);
222 fprintf(stdout, "release array:\n");
223 NS_RELEASE(array);
226 fprintf(stdout, "error can't create array: %x\n", rv);