/external/mockito/src/test/java/org/mockito/internal/stubbing/defaultanswers/ |
D | ReturnsSmartNullsTest.java | 21 Answer<Object> answer = new ReturnsSmartNulls(); in should_return_the_usual_default_values_for_primitives() local 22 … assertEquals(false , answer.answer(invocationOf(HasPrimitiveMethods.class, "booleanMethod"))); in should_return_the_usual_default_values_for_primitives() 23 … assertEquals((char) 0, answer.answer(invocationOf(HasPrimitiveMethods.class, "charMethod"))); in should_return_the_usual_default_values_for_primitives() 24 … assertEquals((byte) 0, answer.answer(invocationOf(HasPrimitiveMethods.class, "byteMethod"))); in should_return_the_usual_default_values_for_primitives() 25 … assertEquals((short) 0, answer.answer(invocationOf(HasPrimitiveMethods.class, "shortMethod"))); in should_return_the_usual_default_values_for_primitives() 26 … assertEquals(0, answer.answer(invocationOf(HasPrimitiveMethods.class, "intMethod"))); in should_return_the_usual_default_values_for_primitives() 27 … assertEquals(0L, answer.answer(invocationOf(HasPrimitiveMethods.class, "longMethod"))); in should_return_the_usual_default_values_for_primitives() 28 … assertEquals(0f, answer.answer(invocationOf(HasPrimitiveMethods.class, "floatMethod"))); in should_return_the_usual_default_values_for_primitives() 29 … assertEquals(0d, answer.answer(invocationOf(HasPrimitiveMethods.class, "doubleMethod"))); in should_return_the_usual_default_values_for_primitives() 40 Answer<Object> answer = new ReturnsSmartNulls(); in should_return_an_object_that_fails_on_any_method_invocation_for_non_primitives() local [all …]
|
D | ReturnsMocksTest.java | 47 ReturnsMocks answer = new ReturnsMocks(); in should_return_the_usual_default_values_for_primitives() local 48 … assertEquals(false, answer.answer(invocationOf(HasPrimitiveMethods.class, "booleanMethod"))); in should_return_the_usual_default_values_for_primitives() 49 … assertEquals((char) 0, answer.answer(invocationOf(HasPrimitiveMethods.class, "charMethod"))); in should_return_the_usual_default_values_for_primitives() 50 … assertEquals((byte) 0, answer.answer(invocationOf(HasPrimitiveMethods.class, "byteMethod"))); in should_return_the_usual_default_values_for_primitives() 51 … assertEquals((short) 0, answer.answer(invocationOf(HasPrimitiveMethods.class, "shortMethod"))); in should_return_the_usual_default_values_for_primitives() 52 assertEquals(0, answer.answer(invocationOf(HasPrimitiveMethods.class, "intMethod"))); in should_return_the_usual_default_values_for_primitives() 53 assertEquals(0L, answer.answer(invocationOf(HasPrimitiveMethods.class, "longMethod"))); in should_return_the_usual_default_values_for_primitives() 54 assertEquals(0f, answer.answer(invocationOf(HasPrimitiveMethods.class, "floatMethod"))); in should_return_the_usual_default_values_for_primitives() 55 assertEquals(0d, answer.answer(invocationOf(HasPrimitiveMethods.class, "doubleMethod"))); in should_return_the_usual_default_values_for_primitives() 66 … String[] ret = (String[]) values.answer(invocationOf(StringMethods.class, "stringArrayMethod")); in should_return_empty_array() [all …]
|
/external/mockito/src/main/java/org/mockito/internal/stubbing/answers/ |
D | AnswerFunctionalInterfaces.java | 39 public static <T, A> Answer<T> toAnswer(final Answer1<T, A> answer) { in toAnswer() argument 42 public T answer(InvocationOnMock invocation) throws Throwable { in toAnswer() 43 return answer.answer((A)invocation.getArgument(0)); in toAnswer() 54 public static <A> Answer<Void> toAnswer(final VoidAnswer1<A> answer) { 57 public Void answer(InvocationOnMock invocation) throws Throwable { 58 answer.answer((A)invocation.getArgument(0)); 72 public static <T, A, B> Answer<T> toAnswer(final Answer2<T, A, B> answer) { 75 public T answer(InvocationOnMock invocation) throws Throwable { 76 return answer.answer( 90 public static <A, B> Answer<Void> toAnswer(final VoidAnswer2<A, B> answer) { [all …]
|
/external/mockito/src/main/java/org/mockito/ |
D | AdditionalAnswers.java | 329 public static <T, A> Answer<T> answer(Answer1<T, A> answer) { in answer() argument 330 return toAnswer(answer); in answer() 342 public static <A> Answer<Void> answerVoid(VoidAnswer1<A> answer) { in answerVoid() argument 343 return toAnswer(answer); in answerVoid() 357 public static <T, A, B> Answer<T> answer(Answer2<T, A, B> answer) { in answer() argument 358 return toAnswer(answer); in answer() 371 public static <A, B> Answer<Void> answerVoid(VoidAnswer2<A, B> answer) { in answerVoid() argument 372 return toAnswer(answer); in answerVoid() 387 public static <T, A, B, C> Answer<T> answer(Answer3<T, A, B, C> answer) { in answer() method in AdditionalAnswers 388 return toAnswer(answer); in answer() [all …]
|
D | BDDMockito.java | 93 BDDMyOngoingStubbing<T> willAnswer(Answer<?> answer); in willAnswer() argument 99 BDDMyOngoingStubbing<T> will(Answer<?> answer); in will() argument 155 public BDDMyOngoingStubbing<T> willAnswer(Answer<?> answer) { in willAnswer() argument 156 return new BDDOngoingStubbingImpl<T>(mockitoOngoingStubbing.thenAnswer(answer)); in willAnswer() 159 public BDDMyOngoingStubbing<T> will(Answer<?> answer) { in will() argument 160 return new BDDOngoingStubbingImpl<T>(mockitoOngoingStubbing.then(answer)); in will() 330 BDDStubber willAnswer(Answer<?> answer); in willAnswer() argument 336 BDDStubber will(Answer<?> answer); in will() argument 412 public BDDStubber willAnswer(Answer<?> answer) { in willAnswer() argument 413 return new BDDStubberImpl(mockitoStubber.doAnswer(answer)); in willAnswer() [all …]
|
/external/ltp/testcases/misc/math/nextafter/ |
D | nextafter01.c | 60 double answer; in main() local 67 answer = nextafter(1.0, 1.1); in main() 68 check = (answer + 1.0) / 2; in main() 69 if ((check != answer) && ((float)check != 1.0)) { in main() 71 answer); in main() 79 answer = nextafter(1.0, 0.9); in main() 80 if ((check != answer) && (check != 1.0)) { in main() 82 answer); in main() 90 answer = nextafter(1.0, 1.0); in main() 91 if (answer != 1.0) { in main() [all …]
|
/external/python/cpython2/Tools/scripts/ |
D | treesync.py | 74 answer=create_directories): 123 copy(master, slave, answer=create_files) 139 copy(master, slave, answer=write_slave) 150 copy(slave, master, "rb", answer=write_master) 153 copy(slave, master, "r", answer=write_master) 176 def copy(src, dst, rmode="rb", wmode="wb", answer='ask'): argument 179 if not okay("okay to copy? ", answer): 190 def okay(prompt, answer='ask'): argument 191 answer = answer.strip().lower() 192 if not answer or answer[0] not in 'ny': [all …]
|
/external/webrtc/talk/session/media/ |
D | srtpfilter_unittest.cc | 155 std::vector<CryptoParams> answer(MakeVector(kTestCryptoParams2)); in TEST_F() local 159 answer[0].tag = 2; in TEST_F() 160 answer[0].cipher_suite = CS_AES_CM_128_HMAC_SHA1_32; in TEST_F() 163 EXPECT_TRUE(f1_.SetAnswer(answer, CS_REMOTE)); in TEST_F() 169 std::vector<CryptoParams> offer, answer; in TEST_F() local 171 EXPECT_TRUE(f1_.SetAnswer(answer, CS_REMOTE)); in TEST_F() 177 std::vector<CryptoParams> answer; in TEST_F() local 179 EXPECT_TRUE(f1_.SetAnswer(answer, CS_REMOTE)); in TEST_F() 186 std::vector<CryptoParams> answer(MakeVector(kTestCryptoParams2)); in TEST_F() local 187 EXPECT_FALSE(f1_.SetAnswer(answer, CS_LOCAL)); in TEST_F() [all …]
|
D | mediasession_unittest.cc | 451 rtc::scoped_ptr<SessionDescription> answer( in TestMediaDirectionInAnswer() local 454 GetFirstAudioContentDescription(answer.get()); in TestMediaDirectionInAnswer() 457 GetFirstVideoContentDescription(answer.get()); in TestMediaDirectionInAnswer() 583 rtc::scoped_ptr<SessionDescription> answer( in TEST_F() local 592 updated_opts, answer.get())); in TEST_F() 773 rtc::scoped_ptr<SessionDescription> answer( in TEST_F() local 775 const ContentInfo* ac = answer->GetContentByName("audio"); in TEST_F() 776 const ContentInfo* vc = answer->GetContentByName("video"); in TEST_F() 799 rtc::scoped_ptr<SessionDescription> answer( in TEST_F() local 801 const ContentInfo* ac = answer->GetContentByName("audio"); in TEST_F() [all …]
|
/external/mdnsresponder/mDNSPosix/ |
D | Identify.c | 107 …llback(mDNS *const m, DNSQuestion *question, const ResourceRecord *const answer, QC_result AddReco… in NameCallback() argument 113 if (answer->rrtype == kDNSType_PTR || answer->rrtype == kDNSType_CNAME) in NameCallback() 115 ConvertDomainNameToCString(&answer->rdata->u.name, hostname); in NameCallback() 117 mprintf("%##s %s %##s\n", answer->name->c, DNSTypeName(answer->rrtype), answer->rdata->u.name.c); in NameCallback() 121 …llback(mDNS *const m, DNSQuestion *question, const ResourceRecord *const answer, QC_result AddReco… in InfoCallback() argument 126 if (answer->rrtype == kDNSType_A) in InfoCallback() 131 mprintf("%##s %s %.4a\n", answer->name->c, DNSTypeName(answer->rrtype), &answer->rdata->u.ipv4); in InfoCallback() 133 hostaddr.ip.v4 = answer->rdata->u.ipv4; in InfoCallback() 135 else if (answer->rrtype == kDNSType_AAAA) in InfoCallback() 140 mprintf("%##s %s %.16a\n", answer->name->c, DNSTypeName(answer->rrtype), &answer->rdata->u.ipv6); in InfoCallback() [all …]
|
/external/mockito/src/main/java/org/mockito/internal/stubbing/ |
D | InvocationContainerImpl.java | 46 public void addAnswer(Answer answer) { in addAnswer() argument 48 addAnswer(answer, false); in addAnswer() 51 public void addConsecutiveAnswer(Answer answer) { in addConsecutiveAnswer() argument 52 addAnswer(answer, true); in addConsecutiveAnswer() 58 public StubbedInvocationMatcher addAnswer(Answer answer, boolean isConsecutive) { in addAnswer() argument 61 if (answer instanceof ValidableAnswer) { in addAnswer() 62 ((ValidableAnswer) answer).validateFor(invocation); in addAnswer() 67 stubbed.getFirst().addAnswer(answer); in addAnswer() 69 stubbed.addFirst(new StubbedInvocationMatcher(invocationForStubbing, answer)); in addAnswer() 76 return findAnswerFor(invocation).answer(invocation); in answerTo() [all …]
|
D | StubbedInvocationMatcher.java | 24 public StubbedInvocationMatcher(InvocationMatcher invocation, Answer answer) { in StubbedInvocationMatcher() argument 26 this.answers.add(answer); in StubbedInvocationMatcher() 29 public Object answer(InvocationOnMock invocation) throws Throwable { in answer() method in StubbedInvocationMatcher 35 return a.answer(invocation); in answer() 38 public void addAnswer(Answer answer) { in addAnswer() argument 39 answers.add(answer); in addAnswer()
|
D | ConsecutiveStubbing.java | 17 public OngoingStubbing<T> thenAnswer(Answer<?> answer) { in thenAnswer() argument 18 invocationContainerImpl.addConsecutiveAnswer(answer); in thenAnswer() 22 public OngoingStubbing<T> then(Answer<?> answer) { in then() argument 23 return thenAnswer(answer); in then()
|
/external/openssh/openbsd-compat/ |
D | getrrsetbyname.c | 168 struct dns_rr *answer; member 198 u_char answer[ANSWER_BUFFER_SIZE]; in getrrsetbyname() local 236 answer, sizeof(answer)); in getrrsetbyname() 252 response = parse_dns_response(answer, length); in getrrsetbyname() 271 rrset->rri_ttl = response->answer->ttl; in getrrsetbyname() 281 rrset->rri_name = strdup(response->answer->name); in getrrsetbyname() 288 rrset->rri_nrdatas = count_dns_rr(response->answer, rrset->rri_rdclass, in getrrsetbyname() 290 rrset->rri_nsigs = count_dns_rr(response->answer, rrset->rri_rdclass, in getrrsetbyname() 311 for (rr = response->answer, index_ans = 0, index_sig = 0; in getrrsetbyname() 383 parse_dns_response(const u_char *answer, int size) in parse_dns_response() argument [all …]
|
/external/webrtc/talk/app/webrtc/ |
D | webrtcsession_unittest.cc | 744 const webrtc::SessionDescriptionInterface* answer = CreateAnswer(NULL); in VerifyAnswerFromNonCryptoOffer() local 746 ASSERT_TRUE(answer == NULL); in VerifyAnswerFromNonCryptoOffer() 758 scoped_ptr<SessionDescriptionInterface> answer(CreateAnswer(NULL)); in VerifyAnswerFromCryptoOffer() local 759 ASSERT_TRUE(answer.get() != NULL); in VerifyAnswerFromCryptoOffer() 760 VerifyCryptoParams(answer->description()); in VerifyAnswerFromCryptoOffer() 873 SessionDescriptionInterface* answer = CreateAnswer(NULL); in CreateAndSetRemoteOfferAndLocalAnswer() local 874 SetLocalDescriptionWithoutError(answer); in CreateAndSetRemoteOfferAndLocalAnswer() 1059 JsepSessionDescription* answer( in CreateRemoteAnswer() local 1061 if (!answer->Initialize(desc_factory_->CreateAnswer(offer->description(), in CreateRemoteAnswer() 1064 delete answer; in CreateRemoteAnswer() [all …]
|
/external/guava/guava-gwt/test-super/com/google/common/collect/super/com/google/common/collect/ |
D | SortedListsTest.java | 37 void assertModelAgrees(List<Integer> list, Integer key, int answer, in assertModelAgrees() argument 42 assertEquals(list.indexOf(key), answer); in assertModelAgrees() local 48 assertEquals(list.lastIndexOf(key), answer); in assertModelAgrees() local 54 assertEquals(key, list.get(answer)); in assertModelAgrees() 60 assertEquals(list.lastIndexOf(key) + 1, answer); in assertModelAgrees() local 66 assertEquals(list.indexOf(key) - 1, answer); in assertModelAgrees() local 80 assertEquals(nextHigherIndex - 1, answer); in assertModelAgrees() 83 assertEquals(nextHigherIndex, answer); in assertModelAgrees() 86 assertEquals(-1 - nextHigherIndex, answer); in assertModelAgrees()
|
/external/v8/src/snapshot/ |
D | snapshot-source-sink.h | 47 uint32_t answer = data_[position_]; in GetInt() local 48 answer |= data_[position_ + 1] << 8; in GetInt() 49 answer |= data_[position_ + 2] << 16; in GetInt() 50 answer |= data_[position_ + 3] << 24; in GetInt() 51 int bytes = (answer & 3) + 1; in GetInt() 55 answer &= mask; in GetInt() 56 answer >>= 2; in GetInt() 57 return answer; in GetInt()
|
/external/guava/guava-tests/test/com/google/common/collect/ |
D | SortedListsTest.java | 39 void assertModelAgrees(List<Integer> list, Integer key, int answer, in assertModelAgrees() argument 44 assertEquals(list.indexOf(key), answer); in assertModelAgrees() local 50 assertEquals(list.lastIndexOf(key), answer); in assertModelAgrees() local 56 assertEquals(key, list.get(answer)); in assertModelAgrees() 62 assertEquals(list.lastIndexOf(key) + 1, answer); in assertModelAgrees() local 68 assertEquals(list.indexOf(key) - 1, answer); in assertModelAgrees() local 82 assertEquals(nextHigherIndex - 1, answer); in assertModelAgrees() 85 assertEquals(nextHigherIndex, answer); in assertModelAgrees() 88 assertEquals(-1 - nextHigherIndex, answer); in assertModelAgrees()
|
/external/mockito/src/test/java/org/mockitousage/stubbing/ |
D | StubbingWithAdditionalAnswersTest.java | 8 import static org.mockito.AdditionalAnswers.answer; 75 .will(answer(new Answer1<String, String>() { in can_return_based_on_strongly_types_one_parameter_function() 76 public String answer(String s) { in can_return_based_on_strongly_types_one_parameter_function() 90 public void answer(String s) { in will_execute_a_void_based_on_strongly_typed_one_parameter_function() 105 .will(answer(new Answer2<String, String, Integer>() { in can_return_based_on_strongly_typed_two_parameter_function() 106 public String answer(String s, Integer i) { in can_return_based_on_strongly_typed_two_parameter_function() 120 public void answer(String s, Integer i) { in will_execute_a_void_based_on_strongly_typed_two_parameter_function() 136 .will(answer(new Answer3<String, Integer, String, String>() { in can_return_based_on_strongly_typed_three_parameter_function() 137 public String answer(Integer i, String s1, String s2) { in can_return_based_on_strongly_typed_three_parameter_function() 153 public void answer(Integer i, String s1, String s2) { in will_execute_a_void_based_on_strongly_typed_three_parameter_function() [all …]
|
/external/ppp/pppd/plugins/pppoatm/ |
D | ans.c | 43 unsigned char answer[MAX_ANSWER]; in ans() local 50 if ((answer_len = res_search(text,C_IN,wanted,answer,MAX_ANSWER)) < 0) in ans() 56 pos = answer+12; in ans() 57 if (answer[3] & 15) return TRY_OTHER; /* rcode != 0 */ in ans() 58 questions = GET16(answer+4); in ans() 60 answers = GET16(answer+6); in ans() 65 if ((name_len = dn_expand(answer,answer+answer_len,pos,name,MAX_NAME)) < 0) in ans() 80 if ((name_len = dn_expand(answer,answer+answer_len,pos,name,MAX_NAME)) in ans() 113 if (dn_expand(answer,answer+answer_len,data,result, in ans()
|
/external/easymock/src/org/easymock/internal/ |
D | Result.java | 41 public Object answer() throws Throwable { in createThrowResult() method in Result.ThrowingAnswer 58 public Object answer() throws Throwable { in createReturnResult() method in Result.ReturningAnswer 75 public Object answer() throws Throwable { in createDelegatingResult() method in Result.DelegatingAnswer 98 public static Result createAnswerResult(IAnswer<?> answer) { in createAnswerResult() argument 99 return new Result(answer, false); in createAnswerResult() 102 public Object answer() throws Throwable { in answer() method in Result 103 return value.answer(); in answer()
|
/external/mockito/src/test/java/org/mockito/internal/stubbing/answers/ |
D | ReturnsArgumentAtTest.java | 21 assertThat(new ReturnsArgumentAt(0).answer(invocationWith("A", "B"))).isEqualTo("A"); in should_be_able_to_return_the_first_parameter() 27 assertThat(new ReturnsArgumentAt(1).answer(invocationWith("A", "B", "C"))).isEqualTo("B"); in should_be_able_to_return_the_second_parameter() 32 assertThat(new ReturnsArgumentAt(-1).answer(invocationWith("A"))).isEqualTo("A"); in should_be_able_to_return_the_last_parameter() 33 assertThat(new ReturnsArgumentAt(-1).answer(invocationWith("A", "B"))).isEqualTo("B"); in should_be_able_to_return_the_last_parameter() 38 assertThat(new ReturnsArgumentAt(0).answer(invocationWith("A", "B", "C"))).isEqualTo("A"); in should_be_able_to_return_the_specified_parameter() 39 assertThat(new ReturnsArgumentAt(1).answer(invocationWith("A", "B", "C"))).isEqualTo("B"); in should_be_able_to_return_the_specified_parameter() 40 assertThat(new ReturnsArgumentAt(2).answer(invocationWith("A", "B", "C"))).isEqualTo("C"); in should_be_able_to_return_the_specified_parameter() 83 …assertThat(new ReturnsArgumentAt(1).answer(mixedVarargsReturningStringArray)).isEqualTo(new String… in should_handle_returning_vararg_as_array() 90 …assertThat(new ReturnsArgumentAt(1).answer(mixedVarargsReturningObjectArray)).isEqualTo(new String… in should_handle_returning_vararg_as_array()
|
/external/libchrome/sandbox/win/src/ |
D | crosscall_client.h | 318 CrossCallReturn* answer) { in CrossCall() argument 322 ResultCode result = ipc_provider.DoCall(call_params, answer); in CrossCall() 338 CrossCallReturn* answer) { in CrossCall() argument 343 ResultCode result = ipc_provider.DoCall(call_params, answer); in CrossCall() 360 CrossCallReturn* answer) { in CrossCall() argument 366 ResultCode result = ipc_provider.DoCall(call_params, answer); in CrossCall() 389 CrossCallReturn* answer) { in CrossCall() argument 396 ResultCode result = ipc_provider.DoCall(call_params, answer); in CrossCall() 422 CrossCallReturn* answer) { in CrossCall() argument 430 ResultCode result = ipc_provider.DoCall(call_params, answer); in CrossCall() [all …]
|
/external/mdnsresponder/mDNSShared/ |
D | dnssd_clientshim.c | 369 …stance(mDNS *const m, DNSQuestion *question, const ResourceRecord *const answer, QC_result AddReco… in FoundInstance() argument 380 if (answer->rrtype != kDNSType_PTR) in FoundInstance() 381 …{ LogMsg("FoundInstance: Should not be called with rrtype %d (not a PTR record)", answer->rrtype);… in FoundInstance() 383 if (!DeconstructServiceName(&answer->rdata->u.name, &name, &type, &domain)) in FoundInstance() 386 answer->name->c, answer->rdata->u.name.c); in FoundInstance() 455 …ceInfo(mDNS *const m, DNSQuestion *question, const ResourceRecord *const answer, QC_result AddReco… in FoundServiceInfo() argument 461 if (answer->rrtype == kDNSType_SRV && x->SRV == answer) x->SRV = mDNSNULL; in FoundServiceInfo() 462 if (answer->rrtype == kDNSType_TXT && x->TXT == answer) x->TXT = mDNSNULL; in FoundServiceInfo() 466 if (answer->rrtype == kDNSType_SRV) x->SRV = answer; in FoundServiceInfo() 467 if (answer->rrtype == kDNSType_TXT) x->TXT = answer; in FoundServiceInfo() [all …]
|
/external/strace/tests/ |
D | qual_fault-exit_group.test | 45 test_with -eexit,exit_group -efault=exit_group:error=ENOSYS ../answer 48 -efault=\!process:error=1 ../answer 51 -efault=exit:error=1:when=2+ ../answer 54 -efault=\!%desc,%file,%memory,%process,%signal,%network,%ipc:error=1 ../answer
|