/external/hamcrest/hamcrest-core/src/test/java/org/hamcrest/core/ |
D | IsInstanceOfTest.java | 24 assertMatches(matcher, 1); in evaluatesToTrueIfArgumentIsInstanceOfASpecificClass() 25 assertMatches(matcher, 1.1); in evaluatesToTrueIfArgumentIsInstanceOfASpecificClass() 42 assertMatches(any(boolean.class), true); in matchesPrimitiveTypes() 43 assertMatches(any(byte.class), (byte)1); in matchesPrimitiveTypes() 44 assertMatches(any(char.class), 'x'); in matchesPrimitiveTypes() 45 assertMatches(any(double.class), 5.0); in matchesPrimitiveTypes() 46 assertMatches(any(float.class), 5.0f); in matchesPrimitiveTypes() 47 assertMatches(any(int.class), 2); in matchesPrimitiveTypes() 48 assertMatches(any(long.class), 4L); in matchesPrimitiveTypes() 49 assertMatches(any(short.class), (short)1); in matchesPrimitiveTypes()
|
D | StringContainsTest.java | 20 assertMatches(stringContains, EXCERPT + "END"); in testMatchesSubstrings() 21 assertMatches(stringContains, "START" + EXCERPT); in testMatchesSubstrings() 22 assertMatches(stringContains, "START" + EXCERPT + "END"); in testMatchesSubstrings() 23 assertMatches(stringContains, EXCERPT); in testMatchesSubstrings() 25 assertMatches(stringContains, EXCERPT + EXCERPT); in testMatchesSubstrings() 34 assertMatches(ignoringCase, "eXcERT" + "END"); in testMatchesSubstringsIgnoringCase() 35 assertMatches(ignoringCase, "START" + "EXCert"); in testMatchesSubstringsIgnoringCase() 36 assertMatches(ignoringCase, "START" + "excERT" + "END"); in testMatchesSubstringsIgnoringCase() 37 assertMatches(ignoringCase, "eXCert" + "excErt"); in testMatchesSubstringsIgnoringCase()
|
D | IsEqualTest.java | 23 assertMatches(matcher1, "hi"); in comparesObjectsUsingEqualsMethod() 28 assertMatches(matcher2, 1); in comparesObjectsUsingEqualsMethod() 37 assertMatches(matcher, null); in canCompareNullValues() 61 assertMatches(matcher, alwaysEqual); in honoursIsEqualImplementationEvenWithNullValues() 73 assertMatches(matcher, s1); in comparesTheElementsOfAnObjectArray() 74 assertMatches(matcher, s2); in comparesTheElementsOfAnObjectArray() 88 assertMatches(matcher, i1); in comparesTheElementsOfAnArrayOfPrimitiveTypes() 89 assertMatches(matcher, i2); in comparesTheElementsOfAnArrayOfPrimitiveTypes() 103 assertMatches(matcher, i1); in recursivelyTestsElementsOfArrays() 104 assertMatches(matcher, i2); in recursivelyTestsElementsOfArrays() [all …]
|
D | StringStartsWithTest.java | 20 assertMatches(stringStartsWith, EXCERPT + "END"); in testMatchesStringAtStart() 23 assertMatches(stringStartsWith, EXCERPT); in testMatchesStringAtStart() 25 assertMatches(stringStartsWith, EXCERPT + EXCERPT); in testMatchesStringAtStart() 35 assertMatches(ignoreCase, "exCerPT" + "END"); in testMatchesStringAtStartIgnoringCase() 38 assertMatches(ignoreCase, "excERPT"); in testMatchesStringAtStartIgnoringCase() 39 assertMatches(ignoreCase, "ExcerPT" + "EXCerpt"); in testMatchesStringAtStartIgnoringCase()
|
D | StringEndsWithTest.java | 21 assertMatches(stringEndsWith, "START" + EXCERPT); in testMatchesSubstringAtEnd() 22 assertMatches(stringEndsWith, EXCERPT); in testMatchesSubstringAtEnd() 25 assertMatches(stringEndsWith, EXCERPT + EXCERPT); in testMatchesSubstringAtEnd() 35 assertMatches(ignoringCase, "START" + "EXceRpt"); in testMatchesSubstringAtEndIngoringCase() 36 assertMatches(ignoringCase, "EXcerPT"); in testMatchesSubstringAtEndIngoringCase() 38 assertMatches(ignoringCase, "exCERpt" + "EXCerPt"); in testMatchesSubstringAtEndIngoringCase()
|
D | IsAnythingTest.java | 7 import static org.hamcrest.AbstractMatcherTest.assertMatches; 18 assertMatches("didn't match null", matcher, null); in alwaysEvaluatesToTrue() 19 assertMatches("didn't match Object", matcher, new Object()); in alwaysEvaluatesToTrue() 20 assertMatches("didn't match custom object", matcher, new CustomThing()); in alwaysEvaluatesToTrue() 21 assertMatches("didn't match String", matcher, "hi"); in alwaysEvaluatesToTrue()
|
D | IsCollectionContainingTest.java | 32 assertMatches("list containing 'a'", itemMatcher, asList("a", "b", "c")); in matchesACollectionThatContainsAnElementForTheGivenMatcher() 58 assertMatches(new IsCollectionContaining<Number>(new IsEqual<Number>(2)), s); in canMatchItemWhenCollectionHoldsSuperclass() 59 assertMatches(IsCollectionContaining.hasItem(2), s); in canMatchItemWhenCollectionHoldsSuperclass() 66 assertMatches("list containing all items", matcher1, asList("a", "b", "c")); in matchesMultipleItemsInCollection() 69 … assertMatches("list containing all items (without matchers)", matcher2, asList("a", "b", "c")); in matchesMultipleItemsInCollection() 72 assertMatches("list containing all items in any order", matcher3, asList("c", "b", "a")); in matchesMultipleItemsInCollection() 75 … assertMatches("list containing all items plus others", matcher4, asList("e", "c", "b", "a", "d")); in matchesMultipleItemsInCollection()
|
D | AnyOfTest.java | 26 assertMatches("didn't pass both sub-matchers", matcher, "good"); in evaluatesToTheTheLogicalDisjunctionOfTwoOtherMatchers() 27 assertMatches("didn't pass second sub-matcher", matcher, "mood"); in evaluatesToTheTheLogicalDisjunctionOfTwoOtherMatchers() 28 assertMatches("didn't pass first sub-matcher", matcher, "goon"); in evaluatesToTheTheLogicalDisjunctionOfTwoOtherMatchers() 36 assertMatches("didn't pass middle sub-matcher", matcher, "vlad"); in evaluatesToTheTheLogicalDisjunctionOfManyOtherMatchers() 48 assertMatches("didn't pass middle sub-matcher", matcher, new SampleSubClass("good")); in supportsMixedTypes()
|
D | CombinableTest.java | 25 assertMatches("both didn't pass", NOT_3_AND_NOT_4, 2); in bothAcceptsAndRejects() 33 assertMatches("tripleAnd didn't pass", tripleAnd, 2); in acceptsAndRejectsThreeAnds() 45 assertMatches("either didn't pass", EITHER_3_OR_4, 3); in eitherAcceptsAndRejects() 53 assertMatches("tripleOr didn't pass", tripleOr, 11); in acceptsAndRejectsThreeOrs()
|
D | IsTest.java | 25 assertMatches(matcher, true); in matchesTheSameWayTheUnderlyingMatcherDoes() 39 assertMatches(matcher, "A"); in providesConvenientShortcutForIsEqualTo() 47 assertMatches(matcher, 1); in providesConvenientShortcutForIsInstanceOf()
|
/external/hamcrest/hamcrest-library/src/test/java/org/hamcrest/io/ |
D | FileMatchersTest.java | 27 assertMatches("matches existing directory", FileMatchers.anExistingDirectory(), directory); in testAnExistingDirectory() 33 assertMatches("matches existing file", FileMatchers.anExistingFileOrDirectory(), file); in testAnExistingFileOrDirectory() 34 … assertMatches("matches existing directory", FileMatchers.anExistingFileOrDirectory(), directory); in testAnExistingFileOrDirectory() 39 assertMatches("matches existing file", FileMatchers.anExistingFile(), file); in testAnExistingFile() 46 assertMatches("matches readable file", FileMatchers.aReadableFile(), file); in testAReadableFile() 53 assertMatches("matches writable file", FileMatchers.aWritableFile(), file); in testAWritableFile() 59 assertMatches("matches file size", FileMatchers.aFileWithSize(0L), file); in testAFileWithSizeLong() 65 assertMatches("matches file size", FileMatchers.aFileWithSize(equalTo(0L)), file); in testAFileWithSizeMatcherOfLong() 71 assertMatches("matches file name", FileMatchers.aFileNamed(equalTo(file.getName())), file); in testAFileNamed() 77 …assertMatches("matches file canonical path", FileMatchers.aFileWithCanonicalPath(equalTo(file.getC… in testAFileWithCanonicalPath() [all …]
|
/external/hamcrest/hamcrest-library/src/test/java/org/hamcrest/xml/ |
D | HasXPathTest.java | 70 assertMatches(hasXPath("/root/something[2]/cheese", equalTo("Cheddar")), xml); in appliesMatcherToXPathInDocument() 71 assertMatches(hasXPath("//something[1]/cheese", containsString("dam")), xml); in appliesMatcherToXPathInDocument() 72 assertMatches(hasXPath("//something[2]/cheese", not(containsString("dam"))), xml); in appliesMatcherToXPathInDocument() 73 assertMatches(hasXPath("/root/@type", equalTo("food")), xml); in appliesMatcherToXPathInDocument() 74 assertMatches(hasXPath("//something[@id='b']/cheese", equalTo("Cheddar")), xml); in appliesMatcherToXPathInDocument() 75 assertMatches(hasXPath("//something[@id='b']/cheese"), xml); in appliesMatcherToXPathInDocument() 80 assertMatches(hasXPath("//emptySomething"), xml); in matchesEmptyElement() 85 assertMatches(hasXPath("//cheese:emptySomething", ns), xml); in matchesEmptyElementInNamespace() 102 assertMatches(hasXPath("//cheese:foreignSomething", ns), xml); in matchesWithNamespace() 103 assertMatches(hasXPath("//cheese:foreignSomething/@milk", ns, equalTo("camel")), xml); in matchesWithNamespace() [all …]
|
/external/hamcrest/hamcrest-library/src/test/java/org/hamcrest/collection/ |
D | IsCollectionWithSizeTest.java | 23 assertMatches("correct size", hasSize(equalTo(2)), asList(null, null)); in testMatchesWhenSizeIsCorrect() 29 assertMatches("correct size", hasSize(equalTo(2)), list); in testMatchesCollectionWhenSizeIsCorrectUsingObjectElementType() 35 assertMatches("correct size", hasSize(equalTo(2)), list); in testMatchesCollectionWhenSizeIsCorrectUsingStringElementType() 41 assertMatches("correct size", hasSize(equalTo(2)), list); in testMatchesCollectionWhenSizeIsCorrectUsingWildcardElementType() 47 assertMatches("correct size", hasSize(equalTo(2)), list); in testMatchesListWhenSizeIsCorrectUsingObjectElementType() 53 assertMatches("correct size", hasSize(equalTo(2)), list); in testMatchesListWhenSizeIsCorrectUsingStringElementType() 59 assertMatches("correct size", hasSize(equalTo(2)), list); in testMatchesListWhenSizeIsCorrectUsingWildcardElementType() 64 assertMatches("correct size", hasSize(2), asList(null, null)); in testProvidesConvenientShortcutForHasSizeEqualTo()
|
D | IsIterableContainingInRelativeOrderTest.java | 25 assertMatches("Single item iterable", containsInRelativeOrder(1), asList(1)); in testMatchingSingleItemIterable() 29 assertMatches("Multiple item iterable", containsInRelativeOrder(1, 2, 3), asList(1, 2, 3)); in testMatchingMultipleItemIterable() 33 … assertMatches("More elements at beginning", containsInRelativeOrder(2, 3, 4), asList(1, 2, 3, 4)); in testMatchesWithMoreElementsThanExpectedAtBeginning() 37 assertMatches("More elements at end", containsInRelativeOrder(1, 2, 3), asList(1, 2, 3, 4)); in testMatchesWithMoreElementsThanExpectedAtEnd() 41 assertMatches("More elements in between", containsInRelativeOrder(1, 3), asList(1, 2, 3)); in testMatchesWithMoreElementsThanExpectedInBetween() 45 assertMatches("Sub section of iterable", containsInRelativeOrder(2, 3), asList(1, 2, 3, 4)); in testMatchesSubSection() 49 …assertMatches("Sub section with single gaps without a first or last match", containsInRelativeOrde… in testMatchesWithSingleGapAndNotFirstOrLast() 53 …assertMatches("Sub section with many gaps iterable", containsInRelativeOrder(2, 4, 6), asList(1, 2… in testMatchingSubSectionWithManyGaps()
|
D | IsMapWithSizeTest.java | 21 assertMatches("correct size", aMapWithSize(equalTo(2)), mapWithKeys("a", "b")); in testMatchesWhenSizeIsCorrect() 27 assertMatches("correct size", aMapWithSize(equalTo(2)), map); in testMatchesMapWhenSizeIsCorrectUsingObjectElementType() 33 assertMatches("correct size", aMapWithSize(equalTo(2)), map); in testMatchesMapWhenSizeIsCorrectUsingStringElementType() 39 assertMatches("correct size", aMapWithSize(equalTo(2)), map); in testMatchesMapWhenSizeIsCorrectUsingWildcardElementType() 45 assertMatches("correct size", aMapWithSize(equalTo(2)), map); in testMatchesListWhenSizeIsCorrectUsingObjectElementType() 51 assertMatches("correct size", aMapWithSize(equalTo(2)), list); in testMatchesListWhenSizeIsCorrectUsingStringElementType() 57 assertMatches("correct size", aMapWithSize(equalTo(2)), list); in testMatchesListWhenSizeIsCorrectUsingWildcardElementType() 62 assertMatches("correct size", aMapWithSize(2), mapWithKeys(new Object(), new Object())); in testProvidesConvenientShortcutForHasSizeEqualTo()
|
D | IsInTest.java | 22 assertMatches("a", isIn, "a"); in testReturnsTrueIfArgumentIsInCollection() 23 assertMatches("b", isIn, "b"); in testReturnsTrueIfArgumentIsInCollection() 24 assertMatches("c", isIn, "c"); in testReturnsTrueIfArgumentIsInCollection() 31 assertMatches("a", isIn, "a"); in testReturnsTrueIfArgumentIsInArray() 32 assertMatches("b", isIn, "b"); in testReturnsTrueIfArgumentIsInArray() 33 assertMatches("c", isIn, "c"); in testReturnsTrueIfArgumentIsInArray()
|
D | IsArrayContainingInAnyOrderTest.java | 24 assertMatches("in order", arrayContainingInAnyOrder(1, 2, 3), new Integer[] {1, 2, 3}); in testMatchesItemsInAnyOrder() 25 assertMatches("out of order", arrayContainingInAnyOrder(1, 2, 3), new Integer[] {3, 2, 1}); in testMatchesItemsInAnyOrder() 26 assertMatches("single", arrayContainingInAnyOrder(1), new Integer[] {1}); in testMatchesItemsInAnyOrder() 31 …assertMatches("in order", arrayContainingInAnyOrder(equalTo(1), equalTo(2), equalTo(3)), new Integ… in testAppliesMatchersInAnyOrder() 32 …assertMatches("out of order", arrayContainingInAnyOrder(equalTo(1), equalTo(2), equalTo(3)), new I… in testAppliesMatchersInAnyOrder() 33 assertMatches("single", arrayContainingInAnyOrder(equalTo(1)), new Integer[] {1}); in testAppliesMatchersInAnyOrder()
|
D | IsArrayContainingInOrderTest.java | 23 assertMatches("in order", arrayContaining(1, 2, 3), new Integer[] {1, 2, 3}); in testMatchesItemsInOrder() 24 assertMatches("single", arrayContaining(1), new Integer[] {1}); in testMatchesItemsInOrder() 29 …assertMatches("in order", arrayContaining(equalTo(1), equalTo(2), equalTo(3)), new Integer[] {1, 2… in testAppliesMatchersInOrder() 30 assertMatches("single", arrayContaining(equalTo(1)), new Integer[] {1}); in testAppliesMatchersInOrder() 43 assertMatches("with nulls", arrayContaining(null, null), new Object[]{null, null}); in testCanHandleNullValuesInAnArray()
|
D | IsIterableWithSizeTest.java | 19 assertMatches("Empty iterable", iterableWithSize(0), Collections.emptyList()); in testMatchesEmptyIterable() 23 assertMatches("Single item iterable", iterableWithSize(1), Arrays.<Object>asList(1)); in testMatchingSingleItemIterable() 27 … assertMatches("Multiple item iterable", iterableWithSize(3), Arrays.<Object>asList(1, 2, 3)); in testMatchingMultipleItemIterable()
|
D | IsArrayWithSizeTest.java | 18 assertMatches("correct size", arrayWithSize(equalTo(3)), new Object[] {1, 2, 3}); in testMatchesWhenSizeIsCorrect() 23 assertMatches("correct size", arrayWithSize(3), new Object[] {1, 2, 3}); in testProvidesConvenientShortcutForArrayWithSizeEqualTo() 28 assertMatches("correct size", emptyArray(), new Object[] {}); in testEmptyArray()
|
D | IsMapContainingValueTest.java | 33 assertMatches("Singleton map", hasValue(1), map); in testMatchesSingletonMapContainingValue() 42 assertMatches("hasValue 1", hasValue(1), map); in testMatchesMapContainingValue() 43 assertMatches("hasValue 3", hasValue(3), map); in testMatchesMapContainingValue()
|
/external/hamcrest/hamcrest-library/src/test/java/org/hamcrest/text/ |
D | IsBlankStringTest.java | 22 assertMatches(blankOrNullString(), ""); in matchesEmptyString() 23 assertMatches(blankString(), ""); in matchesEmptyString() 28 assertMatches(blankOrNullString(), null); in matchesNullAppropriately() 34 assertMatches(blankString(), " \t"); in matchesBlankStringAppropriately() 35 assertMatches(blankOrNullString(), " \t"); in matchesBlankStringAppropriately()
|
D | IsEmptyStringTest.java | 22 assertMatches(emptyOrNullString(), ""); in matchesEmptyString() 23 assertMatches(emptyString(), ""); in matchesEmptyString() 28 assertMatches(emptyOrNullString(), null); in matchesNullAppropriately()
|
D | IsEqualIgnoringCaseTest.java | 23 assertMatches(matcher, "HELLO"); in ignoresCaseOfCharsInString() 24 assertMatches(matcher, "hello"); in ignoresCaseOfCharsInString() 25 assertMatches(matcher, "HelLo"); in ignoresCaseOfCharsInString()
|
/external/hamcrest/hamcrest-library/src/test/java/org/hamcrest/number/ |
D | IsCloseToTest.java | 18 assertMatches("1.0", matcher, 1.0); in test_matchesIfArgumentIsEqualToADoubleValueWithinSomeError() 19 assertMatches("0.5d", matcher, 0.5d); in test_matchesIfArgumentIsEqualToADoubleValueWithinSomeError() 20 assertMatches("1.5d", matcher, 1.5d); in test_matchesIfArgumentIsEqualToADoubleValueWithinSomeError()
|