/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/reporting/ |
SmartPrinter.java | 12 * Makes sure both wanted and actual are printed consistently (single line or multiline) 18 private final String wanted; field in class:SmartPrinter 21 public SmartPrinter(MatchableInvocation wanted, Invocation actual, Integer ... indexesOfMatchersToBeDescribedWithExtraTypeInfo) { 23 printSettings.setMultiline(wanted.toString().contains("\n") || actual.toString().contains("\n")); 26 this.wanted = printSettings.print(wanted); 31 return wanted;
|
/external/mockito/src/main/java/org/mockito/internal/verification/ |
VerificationDataImpl.java | 20 private final InvocationMatcher wanted; field in class:VerificationDataImpl 23 public VerificationDataImpl(InvocationContainerImpl 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 | 16 private final MatchableInvocation wanted; field in class:VerificationDataInOrderImpl 18 public VerificationDataInOrderImpl(InOrderContext inOrder, List<Invocation> allInvocations, MatchableInvocation wanted) { 21 this.wanted = wanted; 33 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);
|
/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);
|
/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, allLocations); 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, allLocations); 46 markVerifiedInOrder(chunk, wanted, orderingContext);
|
NumberOfInvocationsChecker.java | 33 public static void checkNumberOfInvocations(List<Invocation> invocations, MatchableInvocation wanted, int wantedCount) { 34 List<Invocation> actualInvocations = findInvocations(invocations, wanted); 39 throw tooLittleActualInvocations(new Discrepancy(wantedCount, actualCount), wanted, allLocations); 42 throw neverWantedButInvoked(wanted, getAllLocations(actualInvocations)); 45 throw tooManyActualInvocations(wantedCount, actualCount, wanted, getAllLocations(actualInvocations)); 48 markVerified(actualInvocations, wanted); 51 public static void checkNumberOfInvocations(List<Invocation> invocations, MatchableInvocation wanted, int wantedCount, InOrderContext context) { 52 List<Invocation> chunk = findMatchingChunk(invocations, wanted, wantedCount, context); 58 throw tooLittleActualInvocationsInOrder(new Discrepancy(wantedCount, actualCount), wanted, allLocations); 61 throw tooManyActualInvocationsInOrder(wantedCount, actualCount, wanted, getAllLocations(chunk)) [all...] |
/external/apache-commons-compress/src/main/java/org/apache/commons/compress/utils/ |
SeekableInMemoryByteChannel.java | 110 int wanted = buf.remaining(); local 115 if (wanted > possible) { 116 wanted = possible; 118 buf.put(data, position, wanted); 119 position += wanted; 120 return wanted; 136 int wanted = b.remaining(); local 138 if (wanted > possibleWithoutResize) { 139 int newSize = position + wanted; 142 wanted = Integer.MAX_VALUE - position [all...] |
/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)
|
/external/python/cpython2/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)
|
/external/python/cpython3/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, 47 self.assertEqual(cmd.build_scripts, wanted)
|
/external/mockito/src/test/java/org/mockito/internal/verification/ |
OnlyTest.java | 26 private final InvocationMatcher wanted; field in class:OnlyTest.VerificationDataStub 28 public VerificationDataStub(InvocationMatcher wanted, Invocation invocation) { 30 this.wanted = wanted; 39 return wanted; 43 return wanted;
|
/external/mockito/src/test/java/org/mockito/internal/verification/checkers/ |
NumberOfInvocationsInOrderCheckerTest.java | 32 private InvocationMatcher wanted; field in class:NumberOfInvocationsInOrderCheckerTest 50 wanted = buildSimpleMethod().toInvocationMatcher(); 53 NumberOfInvocationsChecker.checkNumberOfInvocations(invocations, wanted, 0, context); 58 wanted = buildSimpleMethod().toInvocationMatcher(); 60 NumberOfInvocationsChecker.checkNumberOfInvocations(invocations, wanted, 1, context); 68 wanted = buildSimpleMethod().toInvocationMatcher(); 73 exception.expectMessage("Wanted 4 times"); 76 NumberOfInvocationsChecker.checkNumberOfInvocations(invocations, wanted, 4, context); 84 wanted = buildSimpleMethod().toInvocationMatcher(); 87 NumberOfInvocationsChecker.checkNumberOfInvocations(invocations, wanted, 1, context) [all...] |