HomeSort by relevance Sort by last modified time
    Searched refs:wanted (Results 1 - 25 of 372) sorted by null

1 2 3 4 5 6 7 8 91011>>

  /external/mockito/src/main/java/org/mockito/internal/matchers/
Same.java 15 private final Object wanted; field in class:Same
17 public Same(Object wanted) {
18 this.wanted = wanted;
22 return wanted == actual;
26 return "same(" + ValuePrinter.print(wanted) + ")";
ArrayEquals.java 13 public ArrayEquals(Object wanted) {
14 super(wanted);
18 Object wanted = getWanted(); local
19 if (wanted == null || actual == null) {
21 } else if (wanted instanceof boolean[] && actual instanceof boolean[]) {
22 return Arrays.equals((boolean[]) wanted, (boolean[]) actual);
23 } else if (wanted instanceof byte[] && actual instanceof byte[]) {
24 return Arrays.equals((byte[]) wanted, (byte[]) actual);
25 } else if (wanted instanceof char[] && actual instanceof char[]) {
26 return Arrays.equals((char[]) wanted, (char[]) actual)
    [all...]
Equals.java 15 private final Object wanted; field in class:Equals
17 public Equals(Object wanted) {
18 this.wanted = wanted;
22 return Equality.areEqual(this.wanted, actual);
26 return describe(wanted);
34 return wanted;
43 return this.wanted == null && other.wanted == null || this.wanted != null && this.wanted.equals(other.wanted)
    [all...]
EqualsWithDelta.java 14 private final Number wanted; field in class:EqualsWithDelta
18 this.wanted = value;
23 if (wanted == null ^ actual == null) {
27 if (wanted == actual) {
31 return wanted.doubleValue() - delta.doubleValue() <= actual.doubleValue()
32 && actual.doubleValue() <= wanted.doubleValue()
37 return "eq(" + wanted + ", " + delta + ")";
CompareTo.java 13 private final T wanted; field in class:CompareTo
16 this.wanted = value;
24 if (!actual.getClass().isInstance(wanted)){
28 int result = actual.compareTo(wanted);
34 return getName() + "(" + wanted + ")";
  /external/mockito/src/main/java/org/mockito/internal/matchers/apachecommons/
ReflectionEquals.java 14 private final Object wanted; field in class:ReflectionEquals
17 public ReflectionEquals(Object wanted, String... excludeFields) {
18 this.wanted = wanted;
23 return EqualsBuilder.reflectionEquals(wanted, actual, excludeFields);
27 return "refEq(" + wanted + ")";
  /external/mockito/src/main/java/org/mockito/internal/verification/
VerificationDataImpl.java 20 private final InvocationMatcher wanted; field in class:VerificationDataImpl
23 public VerificationDataImpl(InvocationContainer invocations, InvocationMatcher wanted) {
25 this.wanted = wanted;
36 return wanted;
41 return wanted;
45 if (wanted == null) {
48 if (isToStringMethod(wanted.getMethod())) {
  /external/mockito/src/main/java/org/mockito/internal/verification/api/
VerificationDataInOrderImpl.java 17 private final MatchableInvocation wanted; field in class:VerificationDataInOrderImpl
19 public VerificationDataInOrderImpl(InOrderContext inOrder, List<Invocation> allInvocations, MatchableInvocation wanted) {
22 this.wanted = wanted;
34 return wanted;
  /external/mockito/src/test/java/org/mockitousage/matchers/
ReflectionMatchersTest.java 55 Child wanted = new Child(1, "foo", 2, "bar"); local
56 verify(mock).run(refEq(wanted));
61 Child wanted = new Child(1, "foo", 2, "bar XXX"); local
62 verify(mock).run(refEq(wanted));
67 Child wanted = new Child(1, "foo", 999, "bar"); local
68 verify(mock).run(refEq(wanted));
73 Child wanted = new Child(1, "XXXXX", 2, "bar"); local
74 verify(mock).run(refEq(wanted));
79 Child wanted = new Child(234234, "foo", 2, "bar"); local
80 verify(mock).run(refEq(wanted));
85 Child wanted = new Child(1, "foo", 2, "excluded"); local
91 Child wanted = new Child(234234, "foo", 2, "excluded"); local
98 Child wanted = new Child(234234, "foo", 2, "excluded"); local
    [all...]
  /external/mockito/src/main/java/org/mockito/internal/invocation/
InvocationMarker.java 17 public static void markVerified(List<Invocation> invocations, MatchableInvocation wanted) {
19 markVerified(invocation, wanted);
23 public static void markVerified(Invocation invocation, MatchableInvocation wanted) {
25 wanted.captureArgumentsFrom(invocation);
28 public static void markVerifiedInOrder(List<Invocation> chunk, MatchableInvocation wanted, InOrderContext context) {
29 markVerified(chunk, wanted);
InvocationsFinder.java 23 public static List<Invocation> findInvocations(List<Invocation> invocations, MatchableInvocation wanted) {
24 return ListUtil.filter(invocations, new RemoveNotMatching(wanted));
27 public static List<Invocation> findAllMatchingUnverifiedChunks(List<Invocation> invocations, MatchableInvocation wanted, InOrderContext orderingContext) {
29 return ListUtil.filter(unverified, new RemoveNotMatching(wanted));
38 * if wanted is 1 and mode is times(2) then returns
41 * if wanted is 1 and mode is atLeast() then returns
44 * if wanted is 1 and mode is times(x), where x != 2 then returns
47 public static List<Invocation> findMatchingChunk(List<Invocation> invocations, MatchableInvocation wanted, int wantedCount, InOrderContext context) {
49 List<Invocation> firstChunk = getFirstMatchingChunk(wanted, unverified);
52 return findAllMatchingUnverifiedChunks(invocations, wanted, context)
142 private final MatchableInvocation wanted; field in class:InvocationsFinder.RemoveNotMatching
    [all...]
  /external/mockito/src/main/java/org/mockito/internal/junit/
ExceptionFactory.java 20 public static AssertionError createArgumentsAreDifferentException(String message, String wanted, String actual) {
22 return createJUnitArgumentsAreDifferent(message, wanted, actual);
27 private static AssertionError createJUnitArgumentsAreDifferent(String message, String wanted, String actual) {
28 return JUnitArgsAreDifferent.create(message, wanted, actual);
33 JUnitArgsAreDifferent.create("message", "wanted", "actual");
48 static AssertionError create(String message, String wanted, String actual) {
49 return new org.mockito.exceptions.verification.junit.ArgumentsAreDifferent(message, wanted, actual);
  /external/mockito/src/main/java/org/mockito/internal/reporting/
SmartPrinter.java 13 * Makes sure both wanted and actual are printed consistently (single line or multiline)
19 private final String wanted; field in class:SmartPrinter
22 public SmartPrinter(MatchableInvocation wanted, Invocation actual, Integer ... indexesOfMatchersToBeDescribedWithExtraTypeInfo) {
24 printSettings.setMultiline(wanted.toString().contains("\n") || actual.toString().contains("\n"));
27 this.wanted = printSettings.print(wanted);
32 return wanted;
  /prebuilts/go/darwin-x86/src/cmd/compile/internal/gc/testdata/
cmp.go 23 if wanted, got := true, eq_ssa(6); wanted != got {
24 fmt.Printf("eq_ssa: expected %v, got %v\n", wanted, got)
27 if wanted, got := false, eq_ssa(7); wanted != got {
28 fmt.Printf("eq_ssa: expected %v, got %v\n", wanted, got)
32 if wanted, got := false, neq_ssa(6); wanted != got {
33 fmt.Printf("neq_ssa: expected %v, got %v\n", wanted, got)
36 if wanted, got := true, neq_ssa(7); wanted != got
    [all...]
arithConst.go     [all...]
  /prebuilts/go/linux-x86/src/cmd/compile/internal/gc/testdata/
cmp.go 23 if wanted, got := true, eq_ssa(6); wanted != got {
24 fmt.Printf("eq_ssa: expected %v, got %v\n", wanted, got)
27 if wanted, got := false, eq_ssa(7); wanted != got {
28 fmt.Printf("eq_ssa: expected %v, got %v\n", wanted, got)
32 if wanted, got := false, neq_ssa(6); wanted != got {
33 fmt.Printf("neq_ssa: expected %v, got %v\n", wanted, got)
36 if wanted, got := true, neq_ssa(7); wanted != got
    [all...]
arithConst.go     [all...]
  /art/test/052-verifier-fun/src/
Main.java 34 static Object[] arrayCheck1(int wanted) {
41 switch (wanted) {
48 static Object arrayCheck1b(int wanted) {
57 switch (wanted) {
65 static Object[] arrayCheck2(int wanted) {
74 switch (wanted) {
82 static Object[] arrayCheck3(int wanted) {
89 switch (wanted) {
  /external/mockito/src/main/java/org/mockito/internal/verification/checkers/
MissingInvocationChecker.java 29 public static void checkMissingInvocation(List<Invocation> invocations, MatchableInvocation wanted) {
30 List<Invocation> actualInvocations = findInvocations(invocations, wanted);
36 Invocation similar = findSimilarInvocation(invocations, wanted);
38 throw wantedButNotInvoked(wanted, invocations);
41 Integer[] indexesOfSuspiciousArgs = getSuspiciouslyNotMatchingArgsIndexes(wanted.getMatchers(), similar.getArguments());
42 SmartPrinter smartPrinter = new SmartPrinter(wanted, similar, indexesOfSuspiciousArgs);
47 public static void checkMissingInvocation(List<Invocation> invocations, MatchableInvocation wanted, InOrderContext context) {
48 List<Invocation> chunk = findAllMatchingUnverifiedChunks(invocations, wanted, context);
56 throw wantedButNotInvokedInOrder(wanted, previousInOrder);
59 checkMissingInvocation(invocations, wanted);
    [all...]
AtLeastXNumberOfInvocationsChecker.java 24 public static void checkAtLeastNumberOfInvocations(List<Invocation> invocations, MatchableInvocation wanted, int wantedCount) {
25 List<Invocation> actualInvocations = findInvocations(invocations, wanted);
30 throw tooLittleActualInvocations(new AtLeastDiscrepancy(wantedCount, actualCount), wanted, lastLocation);
33 markVerified(actualInvocations, wanted);
36 public static void checkAtLeastNumberOfInvocations(List<Invocation> invocations, MatchableInvocation wanted, int wantedCount,InOrderContext orderingContext) {
37 List<Invocation> chunk = findAllMatchingUnverifiedChunks(invocations, wanted, orderingContext);
43 throw tooLittleActualInvocationsInOrder(new AtLeastDiscrepancy(wantedCount, actualCount), wanted, lastLocation);
46 markVerifiedInOrder(chunk, wanted, orderingContext);
  /device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/tests/
test_version.py 35 for v1, v2, wanted in versions:
39 if wanted is ValueError:
45 self.assertEqual(res, wanted,
47 (v1, v2, wanted, res))
61 for v1, v2, wanted in versions:
63 self.assertEqual(res, wanted,
65 (v1, v2, wanted, res))
test_build.py 24 wanted = os.path.join(cmd.build_base, 'lib')
25 self.assertEqual(cmd.build_purelib, wanted)
34 wanted = os.path.join(cmd.build_base, 'lib' + plat_spec)
35 self.assertEqual(cmd.build_platlib, wanted)
41 wanted = os.path.join(cmd.build_base, 'temp' + plat_spec)
42 self.assertEqual(cmd.build_temp, wanted)
45 wanted = os.path.join(cmd.build_base, 'scripts-' + sys.version[0:3])
46 self.assertEqual(cmd.build_scripts, wanted)
  /prebuilts/python/darwin-x86/2.7.5/lib/python2.7/distutils/tests/
test_version.py 35 for v1, v2, wanted in versions:
39 if wanted is ValueError:
45 self.assertEqual(res, wanted,
47 (v1, v2, wanted, res))
61 for v1, v2, wanted in versions:
63 self.assertEqual(res, wanted,
65 (v1, v2, wanted, res))
test_build.py 24 wanted = os.path.join(cmd.build_base, 'lib')
25 self.assertEqual(cmd.build_purelib, wanted)
34 wanted = os.path.join(cmd.build_base, 'lib' + plat_spec)
35 self.assertEqual(cmd.build_platlib, wanted)
41 wanted = os.path.join(cmd.build_base, 'temp' + plat_spec)
42 self.assertEqual(cmd.build_temp, wanted)
45 wanted = os.path.join(cmd.build_base, 'scripts-' + sys.version[0:3])
46 self.assertEqual(cmd.build_scripts, wanted)
  /prebuilts/python/linux-x86/2.7.5/lib/python2.7/distutils/tests/
test_version.py 35 for v1, v2, wanted in versions:
39 if wanted is ValueError:
45 self.assertEqual(res, wanted,
47 (v1, v2, wanted, res))
61 for v1, v2, wanted in versions:
63 self.assertEqual(res, wanted,
65 (v1, v2, wanted, res))

Completed in 930 milliseconds

1 2 3 4 5 6 7 8 91011>>