/external/mockito/src/main/java/org/mockito/internal/matchers/ |
D | ArrayEquals.java | 13 public ArrayEquals(Object wanted) { in ArrayEquals() argument 14 super(wanted); in ArrayEquals() 18 Object wanted = getWanted(); in matches() local 19 if (wanted == null || actual == null) { in matches() 21 } else if (wanted instanceof boolean[] && actual instanceof boolean[]) { in matches() 22 return Arrays.equals((boolean[]) wanted, (boolean[]) actual); in matches() 23 } else if (wanted instanceof byte[] && actual instanceof byte[]) { in matches() 24 return Arrays.equals((byte[]) wanted, (byte[]) actual); in matches() 25 } else if (wanted instanceof char[] && actual instanceof char[]) { in matches() 26 return Arrays.equals((char[]) wanted, (char[]) actual); in matches() [all …]
|
D | Equals.java | 15 private final Object wanted; field in Equals 17 public Equals(Object wanted) { in Equals() argument 18 this.wanted = wanted; in Equals() 22 return Equality.areEqual(this.wanted, actual); in matches() 26 return describe(wanted); in toString() 34 return wanted; in getWanted() 43 …return this.wanted == null && other.wanted == null || this.wanted != null && this.wanted.equals(ot… in equals() 52 return "("+ wanted.getClass().getSimpleName() +") " + describe(wanted); in toStringWithType() 56 return wanted != null && target != null && target.getClass() == wanted.getClass(); in typeMatches()
|
D | EqualsWithDelta.java | 14 private final Number wanted; field in EqualsWithDelta 18 this.wanted = value; in EqualsWithDelta() 23 if (wanted == null ^ actual == null) { in matches() 27 if (wanted == actual) { in matches() 31 return wanted.doubleValue() - delta.doubleValue() <= actual.doubleValue() in matches() 32 && actual.doubleValue() <= wanted.doubleValue() in matches() 37 return "eq(" + wanted + ", " + delta + ")"; in toString()
|
D | Same.java | 15 private final Object wanted; field in Same 17 public Same(Object wanted) { in Same() argument 18 this.wanted = wanted; in Same() 22 return wanted == actual; in matches() 26 return "same(" + ValuePrinter.print(wanted) + ")"; in toString()
|
/external/mockito/src/test/java/org/mockitousage/matchers/ |
D | ReflectionMatchersTest.java | 55 Child wanted = new Child(1, "foo", 2, "bar"); in shouldMatchWhenFieldValuesEqual() local 56 verify(mock).run(refEq(wanted)); in shouldMatchWhenFieldValuesEqual() 61 Child wanted = new Child(1, "foo", 2, "bar XXX"); in shouldNotMatchWhenFieldValuesDiffer() local 62 verify(mock).run(refEq(wanted)); in shouldNotMatchWhenFieldValuesDiffer() 67 Child wanted = new Child(1, "foo", 999, "bar"); in shouldNotMatchAgain() local 68 verify(mock).run(refEq(wanted)); in shouldNotMatchAgain() 73 Child wanted = new Child(1, "XXXXX", 2, "bar"); in shouldNotMatchYetAgain() local 74 verify(mock).run(refEq(wanted)); in shouldNotMatchYetAgain() 79 Child wanted = new Child(234234, "foo", 2, "bar"); in shouldNotMatch() local 80 verify(mock).run(refEq(wanted)); in shouldNotMatch() [all …]
|
/external/mockito/src/main/java/org/mockito/internal/invocation/ |
D | InvocationsFinder.java | 23 …static List<Invocation> findInvocations(List<Invocation> invocations, MatchableInvocation wanted) { in findInvocations() argument 24 return ListUtil.filter(invocations, new RemoveNotMatching(wanted)); in findInvocations() 27 …tchingUnverifiedChunks(List<Invocation> invocations, MatchableInvocation wanted, InOrderContext or… in findAllMatchingUnverifiedChunks() argument 29 return ListUtil.filter(unverified, new RemoveNotMatching(wanted)); in findAllMatchingUnverifiedChunks() 47 …ion> findMatchingChunk(List<Invocation> invocations, MatchableInvocation wanted, int wantedCount, … in findMatchingChunk() argument 49 List<Invocation> firstChunk = getFirstMatchingChunk(wanted, unverified); in findMatchingChunk() 52 return findAllMatchingUnverifiedChunks(invocations, wanted, context); in findMatchingChunk() 58 …private static List<Invocation> getFirstMatchingChunk(MatchableInvocation wanted, List<Invocation>… in getFirstMatchingChunk() argument 61 if (wanted.matches(invocation)) { in getFirstMatchingChunk() 70 …ngUnverifiedInvocation(List<Invocation> invocations, MatchableInvocation wanted, InOrderContext co… in findFirstMatchingUnverifiedInvocation() argument [all …]
|
D | InvocationMarker.java | 17 public static void markVerified(List<Invocation> invocations, MatchableInvocation wanted) { in markVerified() argument 19 markVerified(invocation, wanted); in markVerified() 23 public static void markVerified(Invocation invocation, MatchableInvocation wanted) { in markVerified() argument 25 wanted.captureArgumentsFrom(invocation); in markVerified() 28 …public static void markVerifiedInOrder(List<Invocation> chunk, MatchableInvocation wanted, InOrder… in markVerifiedInOrder() argument 29 markVerified(chunk, wanted); in markVerifiedInOrder()
|
/external/mockito/src/test/java/org/mockito/internal/verification/checkers/ |
D | NumberOfInvocationsInOrderCheckerTest.java | 32 private InvocationMatcher wanted; field in NumberOfInvocationsInOrderCheckerTest 50 wanted = buildSimpleMethod().toInvocationMatcher(); in shouldPassIfWantedIsZeroAndMatchingChunkIsEmpty() 53 NumberOfInvocationsChecker.checkNumberOfInvocations(invocations, wanted, 0, context); in shouldPassIfWantedIsZeroAndMatchingChunkIsEmpty() 58 wanted = buildSimpleMethod().toInvocationMatcher(); in shouldPassIfChunkMatches() 60 NumberOfInvocationsChecker.checkNumberOfInvocations(invocations, wanted, 1, context); in shouldPassIfChunkMatches() 68 wanted = buildSimpleMethod().toInvocationMatcher(); in shouldReportTooLittleInvocations() 76 NumberOfInvocationsChecker.checkNumberOfInvocations(invocations, wanted, 4, context); in shouldReportTooLittleInvocations() 84 wanted = buildSimpleMethod().toInvocationMatcher(); in shouldMarkAsVerifiedInOrder() 87 NumberOfInvocationsChecker.checkNumberOfInvocations(invocations, wanted, 1, context); in shouldMarkAsVerifiedInOrder() 93 wanted = buildSimpleMethod().toInvocationMatcher(); in shouldReportTooLittleActual() [all …]
|
D | NumberOfInvocationsCheckerTest.java | 34 private InvocationMatcher wanted; field in NumberOfInvocationsCheckerTest 49 wanted = buildSimpleMethod().toInvocationMatcher(); in shouldReportTooLittleActual() 57 NumberOfInvocationsChecker.checkNumberOfInvocations(invocations, wanted, 100); in shouldReportTooLittleActual() 62 wanted = buildSimpleMethod().toInvocationMatcher(); in shouldReportAllInvocationsStackTrace() 71 NumberOfInvocationsChecker.checkNumberOfInvocations(invocations, wanted, 100); in shouldReportAllInvocationsStackTrace() 77 wanted = buildSimpleMethod().toInvocationMatcher(); in shouldNotReportWithLastInvocationStackTraceIfNoInvocationsFound() 85 NumberOfInvocationsChecker.checkNumberOfInvocations(invocations, wanted, 100); in shouldNotReportWithLastInvocationStackTraceIfNoInvocationsFound() 95 wanted = buildSimpleMethod().toInvocationMatcher(); in shouldReportWithAllInvocationsStackTrace() 101 NumberOfInvocationsChecker.checkNumberOfInvocations(invocations, wanted, 2); in shouldReportWithAllInvocationsStackTrace() 110 wanted = buildSimpleMethod().toInvocationMatcher(); in shouldReportTooManyActual() [all …]
|
D | MissingInvocationInOrderCheckerTest.java | 32 private InvocationMatcher wanted; field in MissingInvocationInOrderCheckerTest 54 wanted = buildSimpleMethod().toInvocationMatcher(); in shouldPassWhenMatchingInteractionFound() 56 checkMissingInvocation(invocations, wanted, context); in shouldPassWhenMatchingInteractionFound() 62 wanted = buildSimpleMethod().toInvocationMatcher(); in shouldReportWantedButNotInvoked() 68 checkMissingInvocation(invocations, wanted, context); in shouldReportWantedButNotInvoked() 74 wanted = buildIntArgMethod().arg(2222).toInvocationMatcher(); in shouldReportArgumentsAreDifferent() 83 checkMissingInvocation(invocations, wanted, context); in shouldReportArgumentsAreDifferent() 95 wanted = buildIntArgMethod().arg(2222).toInvocationMatcher(); in shouldReportWantedDiffersFromActual() 105 checkMissingInvocation(invocations, wanted, context); in shouldReportWantedDiffersFromActual()
|
/external/apache-commons-compress/src/main/java/org/apache/commons/compress/utils/ |
D | SeekableInMemoryByteChannel.java | 110 int wanted = buf.remaining(); in read() local 115 if (wanted > possible) { in read() 116 wanted = possible; in read() 118 buf.put(data, position, wanted); in read() 119 position += wanted; in read() 120 return wanted; in read() 136 int wanted = b.remaining(); in write() local 138 if (wanted > possibleWithoutResize) { in write() 139 int newSize = position + wanted; in write() 142 wanted = Integer.MAX_VALUE - position; in write() [all …]
|
/external/mockito/src/main/java/org/mockito/internal/verification/checkers/ |
D | NumberOfInvocationsChecker.java | 33 …eckNumberOfInvocations(List<Invocation> invocations, MatchableInvocation wanted, int wantedCount) { in checkNumberOfInvocations() argument 34 List<Invocation> actualInvocations = findInvocations(invocations, wanted); in checkNumberOfInvocations() 39 … throw tooLittleActualInvocations(new Discrepancy(wantedCount, actualCount), wanted, allLocations); in checkNumberOfInvocations() 42 throw neverWantedButInvoked(wanted, getAllLocations(actualInvocations)); in checkNumberOfInvocations() 45 …throw tooManyActualInvocations(wantedCount, actualCount, wanted, getAllLocations(actualInvocations… in checkNumberOfInvocations() 48 markVerified(actualInvocations, wanted); in checkNumberOfInvocations() 51 …eckNumberOfInvocations(List<Invocation> invocations, MatchableInvocation wanted, int wantedCount, … in checkNumberOfInvocations() argument 52 List<Invocation> chunk = findMatchingChunk(invocations, wanted, wantedCount, context); in checkNumberOfInvocations() 58 …tooLittleActualInvocationsInOrder(new Discrepancy(wantedCount, actualCount), wanted, allLocations); in checkNumberOfInvocations() 61 … throw tooManyActualInvocationsInOrder(wantedCount, actualCount, wanted, getAllLocations(chunk)); in checkNumberOfInvocations() [all …]
|
D | MissingInvocationChecker.java | 29 …blic static void checkMissingInvocation(List<Invocation> invocations, MatchableInvocation wanted) { in checkMissingInvocation() argument 30 List<Invocation> actualInvocations = findInvocations(invocations, wanted); in checkMissingInvocation() 36 Invocation similar = findSimilarInvocation(invocations, wanted); in checkMissingInvocation() 38 throw wantedButNotInvoked(wanted, invocations); in checkMissingInvocation() 41 …Integer[] indexesOfSuspiciousArgs = getSuspiciouslyNotMatchingArgsIndexes(wanted.getMatchers(), si… in checkMissingInvocation() 42 SmartPrinter smartPrinter = new SmartPrinter(wanted, similar, indexesOfSuspiciousArgs); in checkMissingInvocation() 47 …checkMissingInvocation(List<Invocation> invocations, MatchableInvocation wanted, InOrderContext co… in checkMissingInvocation() argument 48 List<Invocation> chunk = findAllMatchingUnverifiedChunks(invocations, wanted, context); in checkMissingInvocation() 56 throw wantedButNotInvokedInOrder(wanted, previousInOrder); in checkMissingInvocation() 59 checkMissingInvocation(invocations, wanted); in checkMissingInvocation()
|
D | AtLeastXNumberOfInvocationsChecker.java | 24 …astNumberOfInvocations(List<Invocation> invocations, MatchableInvocation wanted, int wantedCount) { in checkAtLeastNumberOfInvocations() argument 25 List<Invocation> actualInvocations = findInvocations(invocations, wanted); in checkAtLeastNumberOfInvocations() 30 …tooLittleActualInvocations(new AtLeastDiscrepancy(wantedCount, actualCount), wanted, allLocations); in checkAtLeastNumberOfInvocations() 33 markVerified(actualInvocations, wanted); in checkAtLeastNumberOfInvocations() 36 …astNumberOfInvocations(List<Invocation> invocations, MatchableInvocation wanted, int wantedCount,I… in checkAtLeastNumberOfInvocations() argument 37 … List<Invocation> chunk = findAllMatchingUnverifiedChunks(invocations, wanted, orderingContext); in checkAtLeastNumberOfInvocations() 43 …leActualInvocationsInOrder(new AtLeastDiscrepancy(wantedCount, actualCount), wanted, allLocations); in checkAtLeastNumberOfInvocations() 46 markVerifiedInOrder(chunk, wanted, orderingContext); in checkAtLeastNumberOfInvocations()
|
/external/mockito/src/main/java/org/mockito/internal/verification/ |
D | VerificationDataImpl.java | 20 private final InvocationMatcher wanted; field in VerificationDataImpl 23 public VerificationDataImpl(InvocationContainerImpl invocations, InvocationMatcher wanted) { in VerificationDataImpl() argument 25 this.wanted = wanted; in VerificationDataImpl() 36 return wanted; in getTarget() 41 return wanted; in getWanted() 45 if (wanted == null) { in assertWantedIsVerifiable() 48 if (isToStringMethod(wanted.getMethod())) { in assertWantedIsVerifiable()
|
/external/autotest/client/cros/ |
D | kernel_config.py | 42 def _config_required(self, name, wanted): argument 44 if value in wanted: 48 for state in wanted: 70 wanted = ['y'] 72 wanted.append(None) 73 self.has_value(name, wanted) 81 wanted = ['m'] 83 wanted.append(None) 84 self.has_value(name, wanted) 92 wanted = ['y', 'm'] [all …]
|
/external/python/cpython3/Lib/distutils/tests/ |
D | 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, 47 self.assertEqual(cmd.build_scripts, wanted)
|
D | 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))
|
/external/python/cpython2/Lib/distutils/tests/ |
D | 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)
|
D | 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))
|
D | test_dir_util.py | 40 wanted = [] 41 self.assertEqual(self._logs, wanted) 45 wanted = ['creating %s' % self.root_target, 47 self.assertEqual(self._logs, wanted) 51 wanted = ["removing '%s' (and everything under it)" % self.root_target] 52 self.assertEqual(self._logs, wanted) 73 wanted = ['creating %s' % self.root_target] 75 self.assertEqual(self._logs, wanted) 97 wanted = ['copying %s -> %s' % (a_file, self.target2)] 99 self.assertEqual(self._logs, wanted)
|
/external/mockito/src/main/java/org/mockito/internal/matchers/apachecommons/ |
D | ReflectionEquals.java | 14 private final Object wanted; field in ReflectionEquals 17 public ReflectionEquals(Object wanted, String... excludeFields) { in ReflectionEquals() argument 18 this.wanted = wanted; in ReflectionEquals() 23 return EqualsBuilder.reflectionEquals(wanted, actual, excludeFields); in matches() 27 return "refEq(" + wanted + ")"; in toString()
|
/external/mockito/src/main/java/org/mockito/internal/reporting/ |
D | SmartPrinter.java | 18 private final String wanted; field in SmartPrinter 21 …public SmartPrinter(MatchableInvocation wanted, Invocation actual, Integer ... indexesOfMatchersTo… in SmartPrinter() argument 23 … printSettings.setMultiline(wanted.toString().contains("\n") || actual.toString().contains("\n")); in SmartPrinter() 26 this.wanted = printSettings.print(wanted); in SmartPrinter() 31 return wanted; in getWanted()
|
/external/mockito/src/main/java/org/mockito/internal/junit/ |
D | ExceptionFactory.java | 20 …public static AssertionError createArgumentsAreDifferentException(String message, String wanted, S… in createArgumentsAreDifferentException() argument 22 return createJUnitArgumentsAreDifferent(message, wanted, actual); in createArgumentsAreDifferentException() 27 …private static AssertionError createJUnitArgumentsAreDifferent(String message, String wanted, Stri… in createJUnitArgumentsAreDifferent() argument 28 return JUnitArgsAreDifferent.create(message, wanted, actual); in createJUnitArgumentsAreDifferent() 48 static AssertionError create(String message, String wanted, String actual) { in create() argument 49 …eturn new org.mockito.exceptions.verification.junit.ArgumentsAreDifferent(message, wanted, actual); in create()
|
/external/mockito/src/main/java/org/mockito/internal/exceptions/ |
D | Reporter.java | 303 …public static AssertionError argumentsAreDifferent(String wanted, String actual, Location actualLo… in argumentsAreDifferent() argument 305 wanted, in argumentsAreDifferent() 313 return ExceptionFactory.createArgumentsAreDifferentException(message, wanted, actual); in argumentsAreDifferent() 316 public static MockitoAssertionError wantedButNotInvoked(DescribedInvocation wanted) { in wantedButNotInvoked() argument 317 return new WantedButNotInvoked(createWantedButNotInvokedMessage(wanted)); in wantedButNotInvoked() 320 …public static MockitoAssertionError wantedButNotInvoked(DescribedInvocation wanted, List<? extends… in wantedButNotInvoked() argument 336 String message = createWantedButNotInvokedMessage(wanted); in wantedButNotInvoked() 340 private static String createWantedButNotInvokedMessage(DescribedInvocation wanted) { in createWantedButNotInvokedMessage() argument 343 wanted.toString(), in createWantedButNotInvokedMessage() 349 …public static MockitoAssertionError wantedButNotInvokedInOrder(DescribedInvocation wanted, Describ… in wantedButNotInvokedInOrder() argument [all …]
|