Home
last modified time | relevance | path

Searched refs:answer (Results 1 – 25 of 505) sorted by relevance

12345678910>>...21

/external/mockito/src/test/java/org/mockito/internal/stubbing/defaultanswers/
DReturnsSmartNullsTest.java21 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 …]
DReturnsMocksTest.java47 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/
DAnswerFunctionalInterfaces.java39 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 …]
DAnswersWithDelay.java27 private final Answer<Object> answer; field in AnswersWithDelay
29 public AnswersWithDelay(final long sleepyTime, final Answer<Object> answer) { in AnswersWithDelay() argument
31 this.answer = answer; in AnswersWithDelay()
35 public Object answer(final InvocationOnMock invocation) throws Throwable { in answer() method in AnswersWithDelay
37 return answer.answer(invocation); in answer()
42 if (answer instanceof ValidableAnswer) { in validateFor()
43 ((ValidableAnswer) answer).validateFor(invocation); in validateFor()
/external/mockito/src/main/java/org/mockito/
DAdditionalAnswers.java332 public static <T> Answer<T> answersWithDelay(long sleepyTime, Answer<T> answer) { in answersWithDelay() argument
333 return (Answer<T>) new AnswersWithDelay(sleepyTime, (Answer<Object>) answer); in answersWithDelay()
346 public static <T, A> Answer<T> answer(Answer1<T, A> answer) { in answer() argument
347 return toAnswer(answer); in answer()
359 public static <A> Answer<Void> answerVoid(VoidAnswer1<A> answer) { in answerVoid() argument
360 return toAnswer(answer); in answerVoid()
374 public static <T, A, B> Answer<T> answer(Answer2<T, A, B> answer) { in answer() method in AdditionalAnswers
375 return toAnswer(answer); in answer()
388 public static <A, B> Answer<Void> answerVoid(VoidAnswer2<A, B> answer) { in answerVoid() argument
389 return toAnswer(answer); in answerVoid()
[all …]
DBDDMockito.java93 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/python/cpython2/Tools/scripts/
Dtreesync.py74 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/ltp/testcases/misc/math/nextafter/
Dnextafter01.c60 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/webrtc/talk/session/media/
Dsrtpfilter_unittest.cc155 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 …]
Dmediasession_unittest.cc451 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/libhevc/encoder/
Dsqrt_interp.c54 WORD32 index, answer, temp, delta, step_size; in sqrtFix_interpolate() local
69 answer = add32(sqrt_tab[index], step_size); in sqrtFix_interpolate()
74 answer = mult32_shl_sat(answer, INV_SQRT_2_Q31); in sqrtFix_interpolate()
81 answer >>= 1; in sqrtFix_interpolate()
84 return answer; in sqrtFix_interpolate()
89 WORD32 index, answer, temp; in sqrtFix() local
100 answer = sqrt_tab[index]; in sqrtFix()
104 answer = mult32x16in32_shl(answer, INV_SQRT_2_Q15); in sqrtFix()
109 return answer; in sqrtFix()
/external/mdnsresponder/mDNSPosix/
DIdentify.c107 …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/webrtc/talk/app/webrtc/
Dwebrtcsession_unittest.cc744 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/openssh/openbsd-compat/
Dgetrrsetbyname.c168 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/curl/tests/python_dependencies/impacket/
Dstructure.py88 answer = self()
89 answer.fromString(file.read(len(answer)))
90 return answer
225 answer = ''
227 answer += self.pack(two[1], each)
233 return self.pack(two[0], len(data))+answer
234 return answer
289 answer = format[1:]
290 if answer != data:
291 … raise Exception, "Unpacked data doesn't match constant value '%r' should be '%r'" % (data, answer)
[all …]
/external/guava/guava-gwt/test-super/com/google/common/collect/super/com/google/common/collect/
DSortedListsTest.java37 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/guava/guava-tests/test/com/google/common/collect/
DSortedListsTest.java39 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/v8/src/snapshot/
Dsnapshot-source-sink.h50 uint32_t answer = data_[position_]; in GetInt() local
51 answer |= data_[position_ + 1] << 8; in GetInt()
52 answer |= data_[position_ + 2] << 16; in GetInt()
53 answer |= data_[position_ + 3] << 24; in GetInt()
54 int bytes = (answer & 3) + 1; in GetInt()
58 answer &= mask; in GetInt()
59 answer >>= 2; in GetInt()
60 return answer; in GetInt()
/external/ppp/pppd/plugins/pppoatm/
Dans.c43 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/mockito/src/test/java/org/mockitousage/stubbing/
DStubbingWithAdditionalAnswersTest.java9 import static org.mockito.AdditionalAnswers.answer;
91 .will(answer(new Answer1<String, String>() { in can_return_based_on_strongly_types_one_parameter_function()
92 public String answer(String s) { in can_return_based_on_strongly_types_one_parameter_function()
106 public void answer(String s) { in will_execute_a_void_based_on_strongly_typed_one_parameter_function()
121 .will(answer(new Answer2<String, String, Integer>() { in can_return_based_on_strongly_typed_two_parameter_function()
122 public String answer(String s, Integer i) { in can_return_based_on_strongly_typed_two_parameter_function()
136 public void answer(String s, Integer i) { in will_execute_a_void_based_on_strongly_typed_two_parameter_function()
152 .will(answer(new Answer3<String, Integer, String, String>() { in can_return_based_on_strongly_typed_three_parameter_function()
153 public String answer(Integer i, String s1, String s2) { in can_return_based_on_strongly_typed_three_parameter_function()
169 public void answer(Integer i, String s1, String s2) { in will_execute_a_void_based_on_strongly_typed_three_parameter_function()
[all …]
/external/iproute2/ip/
Diplink_vrf.c125 } answer; in ipvrf_get_table() local
136 &answer.n, sizeof(answer)) < 0) { in ipvrf_get_table()
146 ifi = NLMSG_DATA(&answer.n); in ipvrf_get_table()
147 len = answer.n.nlmsg_len - NLMSG_LENGTH(sizeof(*ifi)); in ipvrf_get_table()
195 } answer; in name_is_vrf() local
204 &answer.n, sizeof(answer)) < 0) in name_is_vrf()
207 ifi = NLMSG_DATA(&answer.n); in name_is_vrf()
208 len = answer.n.nlmsg_len - NLMSG_LENGTH(sizeof(*ifi)); in name_is_vrf()
/external/mockito/src/main/java/org/mockito/internal/stubbing/
DInvocationContainerImpl.java54 public void addAnswer(Answer answer, Strictness stubbingStrictness) { in addAnswer() argument
56 addAnswer(answer, false, stubbingStrictness); in addAnswer()
59 public void addConsecutiveAnswer(Answer answer) { in addConsecutiveAnswer() argument
60 addAnswer(answer, true, null); in addConsecutiveAnswer()
66 …public StubbedInvocationMatcher addAnswer(Answer answer, boolean isConsecutive, Strictness stubbin… in addAnswer() argument
69 if (answer instanceof ValidableAnswer) { in addAnswer()
70 ((ValidableAnswer) answer).validateFor(invocation); in addAnswer()
75 stubbed.getFirst().addAnswer(answer); in addAnswer()
78 …stubbed.addFirst(new StubbedInvocationMatcher(answer, invocationForStubbing, effectiveStrictness)); in addAnswer()
85 return findAnswerFor(invocation).answer(invocation); in answerTo()
/external/easymock/src/org/easymock/internal/
DResult.java41 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/u-boot/board/esd/vme8349/
Dcaddy.c24 struct caddy_answer *answer; in generate_answer() local
27 answer = &caddy_interface->answer[caddy_interface->answer_in]; in generate_answer()
28 memset((void *)answer, 0, sizeof(struct caddy_answer)); in generate_answer()
29 answer->answer = cmd->cmd; in generate_answer()
30 answer->issue = cmd->issue; in generate_answer()
31 answer->status = status; in generate_answer()
32 memcpy(answer->par, result, 5 * sizeof(result[0])); in generate_answer()
/external/tensorflow/tensorflow/core/lib/strings/
Dstrcat_test.cc47 string answer; in TEST() local
48 answer = tensorflow::strings::StrCat(s, us); in TEST()
49 EXPECT_EQ(answer, "-12"); in TEST()
50 answer = tensorflow::strings::StrCat(i, ui); in TEST()
51 EXPECT_EQ(answer, "-34"); in TEST()
52 answer = tensorflow::strings::StrCat(l, ul); in TEST()
53 EXPECT_EQ(answer, "-56"); in TEST()
54 answer = tensorflow::strings::StrCat(ll, ull); in TEST()
55 EXPECT_EQ(answer, "-78"); in TEST()
56 answer = tensorflow::strings::StrCat(ptrdiff, size); in TEST()
[all …]

12345678910>>...21