/frameworks/base/tools/aidl/ |
options_test.cpp | 8 struct Answer { 57 test(const Answer& answer) 60 while (answer.argv[argc]) { 67 int result = parse_options(argc, answer.argv, &options); 70 if (((bool)result) != ((bool)answer.result)) { 72 answer.result << endl; 82 if (!match_arrays(answer.systemSearchPath, options.systemSearchPath)) { 86 print_array(" ", answer.systemSearchPath); 91 if (!match_arrays(answer.localSearchPath, options.localSearchPath)) [all...] |
/external/mockito/src/org/mockito/stubbing/ |
OngoingStubbing.java | 148 * Sets a generic Answer for the method. E.g:
150 * when(mock.someMethod(10)).thenAnswer(new Answer<Integer>() {
151 * public Integer answer(InvocationOnMock invocation) throws Throwable {
157 * @param answer the custom answer to execute.
161 OngoingStubbing<T> thenAnswer(Answer<?> answer);
164 * Sets a generic Answer for the method.
166 * This method is an alias of {@link #thenAnswer(Answer)}. This alias allows
176 * @param answer the custom answer to execute. [all...] |
DeprecatedOngoingStubbing.java | 66 * Set a generic Answer for the stubbed method. E.g:
68 * stub(mock.someMethod(10)).toAnswer(new Answer<Integer>() {
69 * public Integer answer(InvocationOnMock invocation) throws Throwable {
75 * @param answer the custom answer to execute.
79 DeprecatedOngoingStubbing<T> toAnswer(Answer<?> answer);
|
VoidMethodStubbable.java | 70 * Stubs a void method with generic {@link Answer}
75 * .toAnswer(new Answer() {
76 * public Object answer(InvocationOnMOck invocation) {
86 * @param answer the custom answer to execute.
90 VoidMethodStubbable<T> toAnswer(Answer<?> answer);
|
/external/qemu/telephony/ |
modem_driver.c | 94 const char* answer; local 103 answer = amodem_send(android_modem, md->in_buff); 104 if (answer != NULL) { 105 D( "%s: >> %s\n", __FUNCTION__, answer ); 106 len = strlen(answer); 107 if (len == 2 && answer[0] == '>' && answer[1] == ' ') 110 qemu_chr_write(md->cs, (const uint8_t*)answer, len); 113 D( "%s: -- NO ANSWER\n", __FUNCTION__ );
|
/external/chromium_org/sandbox/win/src/ |
filesystem_interception.cc | 66 CrossCallReturn answer = {0}; local 71 disposition, options, &answer); 78 if (!NT_SUCCESS(answer.nt_status)) 79 return answer.nt_status; 82 *file = answer.handle; 83 io_status->Status = answer.nt_status; 84 io_status->Information = answer.extended[0].ulong_ptr; 137 CrossCallReturn answer = {0}; local 139 desired_access, sharing, options, &answer); 146 if (!NT_SUCCESS(answer.nt_status) 202 CrossCallReturn answer = {0}; local 260 CrossCallReturn answer = {0}; local 337 CrossCallReturn answer = {0}; local [all...] |
registry_interception.cc | 60 CrossCallReturn answer = {0}; local 64 create_options, &answer); 71 if (!NT_SUCCESS(answer.nt_status)) 72 // TODO(nsylvain): We should return answer.nt_status here instead 81 *key = answer.handle; 84 *disposition = answer.extended[0].unsigned_int; 86 status = answer.nt_status; 119 CrossCallReturn answer = {0}; local 121 root_directory, desired_access, &answer); 128 if (!NT_SUCCESS(answer.nt_status) [all...] |
target_services.cc | 113 CrossCallReturn answer = {0}; local 118 ResultCode code = CrossCall(ipc, IPC_PING1_TAG, cookie, &answer); 125 if ((answer.extended_count != 2)) { 128 // We test the first extended answer to be within the bounds of the tick 132 if ((answer.extended[0].unsigned_int < tick1) || 133 (answer.extended[0].unsigned_int > tick2)) { 138 if (answer.extended[1].unsigned_int != cookie * 2) { 144 ResultCode code = CrossCall(ipc, IPC_PING2_TAG, counted_buffer, &answer);
|
/external/mockito/src/org/mockito/ |
BDDMockito.java | 7 import org.mockito.stubbing.Answer;
67 * See original {@link OngoingStubbing#thenAnswer(Answer)}
70 BDDMyOngoingStubbing<T> willAnswer(Answer<?> answer);
73 * See original {@link OngoingStubbing#then(Answer)}
76 BDDMyOngoingStubbing<T> will(Answer<?> answer);
124 * @see BDDMockito.BDDMyOngoingStubbing#willAnswer(Answer)
126 public BDDMyOngoingStubbing<T> willAnswer(Answer<?> answer) {
[all...] |
/external/mockito/src/org/mockito/internal/stubbing/ |
InvocationContainerImpl.java | 16 import org.mockito.stubbing.Answer; 29 private final List<Answer> answersForStubbing = new ArrayList<Answer>(); 48 public void addAnswer(Answer answer) { 50 addAnswer(answer, false); 53 public void addConsecutiveAnswer(Answer answer) { 54 addAnswer(answer, true); 57 public void addAnswer(Answer answer, boolean isConsecutive) [all...] |
VoidMethodStubbableImpl.java | 9 import org.mockito.stubbing.Answer;
31 public VoidMethodStubbable<T> toAnswer(Answer<?> answer) {
32 invocationContainerImpl.addAnswerForVoidMethod(answer);
|
/external/chromium_org/v8/test/mjsunit/ |
mod.js | 30 var answer = 1; 32 if (answer == i) answer = 0; 34 print(j + " % " + i + " = " + answer); 36 assertEquals(answer, m, j + " % " + i); 38 assertEquals(answer, m, j + " % -" + i); 41 assertEquals(-answer, m, j + " % " + i); 43 if (answer == 0) assertEquals(-Infinity, 1/m); 45 assertEquals(-answer, m, j + " % -" + i); 47 if (answer == 0) assertEquals(-Infinity, 1/m) [all...] |
/external/v8/test/mjsunit/ |
mod.js | 30 var answer = 1; 32 if (answer == i) answer = 0; 34 print(j + " % " + i + " = " + answer); 36 assertEquals(answer, m, j + " % " + i); 38 assertEquals(answer, m, j + " % -" + i); 41 assertEquals(-answer, m, j + " % " + i); 43 if (answer == 0) assertEquals(-Infinity, 1/m); 45 assertEquals(-answer, m, j + " % -" + i); 47 if (answer == 0) assertEquals(-Infinity, 1/m) [all...] |
/external/mockito/src/org/mockito/internal/stubbing/answers/ |
CallsRealMethods.java | 10 import org.mockito.stubbing.Answer;
13 * Optional Answer that adds partial mocking support
15 * {@link Answer} can be used to define the return values of unstubbed invocations.
32 public class CallsRealMethods implements Answer<Object>, Serializable {
35 public Object answer(InvocationOnMock invocation) throws Throwable {
method in class:CallsRealMethods
|
DoesNothing.java | 10 import org.mockito.stubbing.Answer;
12 public class DoesNothing implements Answer<Object>, Serializable {
16 public Object answer(InvocationOnMock invocation) throws Throwable {
method in class:DoesNothing
|
ClonesArguments.java | 10 import org.mockito.stubbing.Answer;
13 //TODO this needs documentation and further analysis - what if someone changes the answer?
15 public class ClonesArguments implements Answer<Object> {
16 public Object answer(InvocationOnMock invocation) throws Throwable {
method in class:ClonesArguments 24 return new ReturnsEmptyValues().answer(invocation);
|
/external/smack/src/org/jivesoftware/smackx/workgroup/packet/ |
AgentInfo.java | 109 AgentInfo answer = new AgentInfo();
local 116 answer.setJid(parser.nextText());
119 answer.setName(parser.nextText());
129 return answer;
|
/external/chromium_org/third_party/libjingle/source/talk/session/media/ |
srtpfilter_unittest.cc | 149 std::vector<CryptoParams> answer(MakeVector(kTestCryptoParams2)); 153 answer[0].tag = 2; 154 answer[0].cipher_suite = CS_AES_CM_128_HMAC_SHA1_32; 156 EXPECT_TRUE(f1_.SetAnswer(answer, CS_REMOTE)); 162 std::vector<CryptoParams> offer, answer; local 164 EXPECT_TRUE(f1_.SetAnswer(answer, CS_REMOTE)); 170 std::vector<CryptoParams> answer; local 172 EXPECT_TRUE(f1_.SetAnswer(answer, CS_REMOTE)); 179 std::vector<CryptoParams> answer(MakeVector(kTestCryptoParams2)); 180 EXPECT_FALSE(f1_.SetAnswer(answer, CS_LOCAL)) 424 std::vector<CryptoParams> answer; local [all...] |
/cts/tests/tests/net/jni/ |
NativeDnsJni.c | 32 struct addrinfo *answer; local 34 int res = getaddrinfo(node, service, NULL, &answer); 42 struct addrinfo *current = answer; 59 freeaddrinfo(answer); 60 answer = NULL; 68 res = getaddrinfo(node, service, NULL, &answer); 75 struct addrinfo *current = answer; 92 freeaddrinfo(answer); 93 answer = NULL;
|
/external/mdnsresponder/mDNSPosix/ |
Identify.c | 67 static volatile int StopNow; // 0 means running, 1 means stop because we got an answer, 2 means stop because of Ctrl-C 107 mDNSlocal void NameCallback(mDNS *const m, DNSQuestion *question, const ResourceRecord *const answer, QC_result AddRecord) 113 if (answer->rrtype == kDNSType_PTR || answer->rrtype == kDNSType_CNAME) 115 ConvertDomainNameToCString(&answer->rdata->u.name, hostname); 117 mprintf("%##s %s %##s\n", answer->name->c, DNSTypeName(answer->rrtype), answer->rdata->u.name.c); 121 mDNSlocal void InfoCallback(mDNS *const m, DNSQuestion *question, const ResourceRecord *const answer, QC_result AddRecord) 126 if (answer->rrtype == kDNSType_A [all...] |
/external/openssh/openbsd-compat/ |
getrrsetbyname.c | 170 struct dns_rr *answer; member in struct:dns_response 200 u_char answer[ANSWER_BUFFER_SIZE]; local 238 answer, sizeof(answer)); 254 response = parse_dns_response(answer, length); 273 rrset->rri_ttl = response->answer->ttl; 282 /* copy name from answer section */ 283 rrset->rri_name = strdup(response->answer->name); 290 rrset->rri_nrdatas = count_dns_rr(response->answer, rrset->rri_rdclass, 292 rrset->rri_nsigs = count_dns_rr(response->answer, rrset->rri_rdclass [all...] |
/ndk/sources/host-tools/make-3.81/tests/ |
run_make_tests.pl | 77 # [2] (string): Answer we should get back. 84 local ($makestring, $options, $answer, $err_code) = @_; 115 # Do the same processing on $answer as we did on $makestring. 117 $answer && $answer !~ /\n$/s and $answer .= "\n"; 118 $answer =~ s/#MAKEFILE#/$makefile/g; 119 $answer =~ s/#MAKEPATH#/$mkpath/g; 120 $answer =~ s/#MAKE#/$make_name/g; 121 $answer =~ s/#PWD#/$pwd/g [all...] |
/bionic/libc/private/ |
resolv_cache.h | 95 /* or the answer buffer is too small */ 97 RESOLV_CACHE_FOUND /* the cache found the answer */ 105 void* answer, 109 /* add a (query,answer) to the cache, only call if _resolv_cache_lookup 117 const void* answer,
|
/external/easymock/src/org/easymock/ |
IExpectationSetters.java | 46 * Sets an object that will be used to calculate the answer for the expected
49 * @param answer
50 * the object used to answer the invocation.
53 IExpectationSetters<T> andAnswer(IAnswer<? extends T> answer);
57 * method call will be delegated to it with the actual arguments. The answer
58 * returned by this call will then be the answer returned by the mock
85 * Sets a stub object that will be used to calculate the answer for the
88 * @param answer
89 * the object used to answer the invocation.
91 void andStubAnswer(IAnswer<? extends T> answer);
[all...] |
/external/mockito/src/org/mockito/internal/stubbing/defaultanswers/ |
ReturnsMocks.java | 12 import org.mockito.stubbing.Answer;
14 public class ReturnsMocks implements Answer<Object>, Serializable {
18 private Answer<Object> delegate = new ReturnsMoreEmptyValues();
20 public Object answer(InvocationOnMock invocation) throws Throwable {
method in class:ReturnsMocks 21 Object ret = delegate.answer(invocation);
|