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

1 2 3 4 5

  /external/hamcrest/hamcrest-library/src/test/java/org/hamcrest/collection/
IsArrayContainingInAnyOrderTest.java 7 import static org.hamcrest.core.IsEqual.equalTo;
14 return arrayContainingInAnyOrder(equalTo(1), equalTo(2));
19 assertDescription("[<1>, <2>] in any order", arrayContainingInAnyOrder(equalTo(1), equalTo(2)));
31 assertMatches("in order", arrayContainingInAnyOrder(equalTo(1), equalTo(2), equalTo(3)), new Integer[] {1, 2, 3});
32 assertMatches("out of order", arrayContainingInAnyOrder(equalTo(1), equalTo(2), equalTo(3)), new Integer[] {3, 2, 1})
    [all...]
IsArrayTest.java 9 import static org.hamcrest.core.IsEqual.equalTo;
16 return array(equalTo("irrelevant"));
21 array(equalTo("a"), equalTo("b"), equalTo("c")), new String[]{"a", "b", "c"});
26 array(equalTo("a"), equalTo("b")), new String[]{"b", "c"});
31 array(equalTo("a"), equalTo("b")), new String[]{"a", "b", "c"});
33 array(equalTo("a"), equalTo("b")), new String[]{"a"})
    [all...]
IsArrayContainingInOrderTest.java 7 import static org.hamcrest.core.IsEqual.equalTo;
14 return arrayContaining(equalTo(1), equalTo(2));
19 assertDescription("[<1>, <2>]", arrayContaining(equalTo(1), equalTo(2)));
29 assertMatches("in order", arrayContaining(equalTo(1), equalTo(2), equalTo(3)), new Integer[] {1, 2, 3});
30 assertMatches("single", arrayContaining(equalTo(1)), new Integer[] {1});
IsMapContainingTest.java 11 import static org.hamcrest.core.IsEqual.equalTo;
25 assertMatches("matcherA", hasEntry(equalTo("a"), equalTo(1)), map);
26 assertMatches("matcherB", hasEntry(equalTo("b"), equalTo(2)), map);
27 assertMismatchDescription("map was [<a=1>, <b=2>]", hasEntry(equalTo("c"), equalTo(3)), map);
36 // assertMatches("matcherA", hasEntry(equalTo("a"), equalTo(1)), map);
37 // assertMatches("matcherB", hasEntry(equalTo("b"), equalTo(2)), map)
    [all...]
IsCollectionWithSizeTest.java 13 import static org.hamcrest.core.IsEqual.equalTo;
23 assertMatches("correct size", hasSize(equalTo(2)), asList(null, null));
24 assertMismatchDescription("collection size was <3>", hasSize(equalTo(2)), asList(null, null, null));
29 assertMatches("correct size", hasSize(equalTo(2)), list);
30 assertMismatchDescription("collection size was <2>", hasSize(equalTo(3)), list);
35 assertMatches("correct size", hasSize(equalTo(2)), list);
36 assertMismatchDescription("collection size was <2>", hasSize(equalTo(3)), list);
41 assertMatches("correct size", hasSize(equalTo(2)), list);
42 assertMismatchDescription("collection size was <2>", hasSize(equalTo(3)), list);
47 assertMatches("correct size", hasSize(equalTo(2)), list)
    [all...]
IsMapWithSizeTest.java 11 import static org.hamcrest.core.IsEqual.equalTo;
21 assertMatches("correct size", aMapWithSize(equalTo(2)), mapWithKeys("a", "b"));
22 assertMismatchDescription("map size was <3>", aMapWithSize(equalTo(2)), mapWithKeys("a", "b", "c"));
27 assertMatches("correct size", aMapWithSize(equalTo(2)), map);
28 assertMismatchDescription("map size was <2>", aMapWithSize(equalTo(3)), map);
33 assertMatches("correct size", aMapWithSize(equalTo(2)), map);
34 assertMismatchDescription("map size was <2>", aMapWithSize(equalTo(3)), map);
39 assertMatches("correct size", aMapWithSize(equalTo(2)), map);
40 assertMismatchDescription("map size was <2>", aMapWithSize(equalTo(3)), map);
45 assertMatches("correct size", aMapWithSize(equalTo(2)), map)
    [all...]
IsArrayWithSizeTest.java 8 import static org.hamcrest.core.IsEqual.equalTo;
14 return arrayWithSize(equalTo(2));
18 assertMatches("correct size", arrayWithSize(equalTo(3)), new Object[] {1, 2, 3});
19 assertDoesNotMatch("incorrect size", arrayWithSize(equalTo(2)), new Object[] {1, 2, 3});
33 assertDescription("an array with size <3>", arrayWithSize(equalTo(3)));
  /external/hamcrest/hamcrest-core/src/test/java/org/hamcrest/core/
AllOfTest.java 9 import static org.hamcrest.core.IsEqual.equalTo;
18 Matcher<String> matcher = allOf(equalTo("irrelevant"), startsWith("irr"));
45 equalTo(new SampleBaseClass("bad")),
47 equalTo(new SampleBaseClass("good")),
48 equalTo(new SampleSubClass("ugly")));
56 allOf(equalTo("good"), equalTo("bad"), equalTo("ugly")));
61 assertMismatchDescription("\"good\" was \"bad\"", allOf(equalTo("bad"), equalTo("good")), "bad")
    [all...]
IsCollectionContainingTest.java 16 import static org.hamcrest.core.IsEqual.equalTo;
22 Matcher<?> matcher = hasItem(equalTo("irrelevant"));
30 final Matcher<Iterable<? super String>> itemMatcher = hasItem(equalTo("a"));
45 assertDoesNotMatch("doesn't match null", hasItem(equalTo("a")), null);
65 final Matcher<Iterable<String>> matcher1 = hasItems(equalTo("a"), equalTo("b"), equalTo("c"));
71 final Matcher<Iterable<String>> matcher3 = hasItems(equalTo("a"), equalTo("b"), equalTo("c"))
    [all...]
AnyOfTest.java 8 import static org.hamcrest.core.IsEqual.equalTo;
16 Matcher<String> matcher = anyOf(equalTo("irrelevant"), startsWith("irr"));
44 equalTo(new SampleBaseClass("bad")),
45 equalTo(new SampleBaseClass("good")),
46 equalTo(new SampleSubClass("ugly")));
54 anyOf(equalTo("good"), equalTo("bad"), equalTo("ugly")));
CombinableTest.java 7 import static org.hamcrest.core.IsEqual.equalTo;
12 private static final CombinableMatcher<Integer> EITHER_3_OR_4 = CombinableMatcher.<Integer>either(equalTo(3)).or(equalTo(4));
13 private static final CombinableMatcher<Integer> NOT_3_AND_NOT_4 = CombinableMatcher.<Integer>both(not(equalTo(3))).and(not(equalTo(4)));
31 CombinableMatcher<? super Integer> tripleAnd = NOT_3_AND_NOT_4.and(equalTo(2));
51 final CombinableMatcher<Integer> tripleOr = EITHER_3_OR_4.or(equalTo(11));
66 Matcher<String> matcher = CombinableMatcher.both(equalTo("yellow")).and(notNullValue(String.class));
IsEqualTest.java 7 import static org.hamcrest.core.IsEqual.equalTo;
14 Matcher<?> matcher = equalTo("irrelevant");
22 final Matcher<String> matcher1 = equalTo("hi");
27 final Matcher<Integer> matcher2 = equalTo(1);
35 final Matcher<Object> matcher = equalTo(null);
59 Matcher<Object> matcher = equalTo(null);
72 final Matcher<String[]> matcher = equalTo(s1);
87 final Matcher<int[]> matcher = equalTo(i1);
102 final Matcher<int[][]> matcher = equalTo(i1);
129 assertDescription("<" + argumentDescription + ">", equalTo(argument))
    [all...]
DescribedAsTest.java 9 import static org.hamcrest.core.IsEqual.equalTo;
37 Matcher<String> matcher = describedAs("irrelevant", equalTo("hi"));
45 Matcher<Integer> matcher = describedAs("irrelevant", equalTo(2));
IsTest.java 9 import static org.hamcrest.core.IsEqual.equalTo;
23 final Matcher<Boolean> matcher = is(equalTo(true));
31 assertDescription("is <true>", is(equalTo(true)));
IsNotTest.java 7 import static org.hamcrest.core.IsEqual.equalTo;
23 final Matcher<String> matcher = not(equalTo("A"));
  /external/hamcrest/hamcrest-library/src/test/java/org/hamcrest/io/
FileMatchersTest.java 8 import static org.hamcrest.core.IsEqual.equalTo;
65 assertMatches("matches file size", FileMatchers.aFileWithSize(equalTo(0L)), file);
67 assertDoesNotMatch("doesn't match incorrect file size", FileMatchers.aFileWithSize(equalTo(23L)), file);
71 assertMatches("matches file name", FileMatchers.aFileNamed(equalTo(file.getName())), file);
73 assertDoesNotMatch("doesn't match incorrect file name", FileMatchers.aFileNamed(equalTo("foo")), file);
77 assertMatches("matches file canonical path", FileMatchers.aFileWithCanonicalPath(equalTo(file.getCanonicalPath())), file);
79 assertDoesNotMatch("doesn't match incorrect canonical path", FileMatchers.aFileWithCanonicalPath(equalTo("foo")), file);
83 assertMatches("matches file absolute path", FileMatchers.aFileWithAbsolutePath(equalTo(file.getAbsolutePath())), file);
85 assertDoesNotMatch("doesn't match incorrect absolute path", FileMatchers.aFileWithAbsolutePath(equalTo("foo")), file);
  /external/hamcrest/hamcrest-library/src/test/java/org/hamcrest/object/
HasToStringTest.java 7 import static org.hamcrest.core.IsEqual.equalTo;
21 Matcher<Object> matcher = hasToString(equalTo("irrelevant"));
29 final Matcher<Object> matcher = hasToString(equalTo(TO_STRING_RESULT));
45 final Matcher<Object> matcher = hasToString(equalTo(TO_STRING_RESULT));
51 final Matcher<Object> matcher = hasToString(equalTo(TO_STRING_RESULT));
  /external/hamcrest/hamcrest-library/src/main/java/org/hamcrest/collection/
IsMapWithSize.java 8 import static org.hamcrest.core.IsEqual.equalTo;
27 * <pre>assertThat(myMap, is(aMapWithSize(equalTo(2))))</pre>
46 Matcher<? super Integer> matcher = equalTo(size);
58 return IsMapWithSize.aMapWithSize(equalTo(0));
IsArrayWithSize.java 7 import static org.hamcrest.core.IsEqual.equalTo;
26 * <pre>assertThat(new String[]{"foo", "bar"}, arrayWithSize(equalTo(2)))</pre>
45 return arrayWithSize(equalTo(size));
  /external/hamcrest/hamcrest-library/src/main/java/org/hamcrest/object/
HasToString.java 6 import static org.hamcrest.core.IsEqual.equalTo;
22 * <pre>assertThat(true, hasToString(equalTo("TRUE")))</pre>
33 * returns a value equalTo the specified string.
41 return new HasToString<T>(equalTo(expectedToString));
  /external/hamcrest/hamcrest-library/src/test/java/org/hamcrest/xml/
HasXPathTest.java 16 import static org.hamcrest.core.IsEqual.equalTo;
70 assertMatches(hasXPath("/root/something[2]/cheese", equalTo("Cheddar")), xml);
73 assertMatches(hasXPath("/root/@type", equalTo("food")), xml);
74 assertMatches(hasXPath("//something[@id='b']/cheese", equalTo("Cheddar")), xml);
90 assertDoesNotMatch(hasXPath("/root/something[3]/cheese", ns, equalTo("Cheddar")), xml);
96 assertDoesNotMatch(hasXPath("//cheese:foreignSomething", equalTo("Badger")), xml);
103 assertMatches(hasXPath("//cheese:foreignSomething/@milk", ns, equalTo("camel")), xml);
104 assertMatches(hasXPath("//cheese:foreignSomething/text()", ns, equalTo("Caravane")), xml);
110 hasXPath("\\g:dfgd::DSgf/root/something[2]/cheese", equalTo("blah"));
120 hasXPath("/some/path", equalTo("Cheddar")))
    [all...]
  /external/hamcrest/hamcrest-core/src/test/java/org/hamcrest/
MatcherAssertTest.java 6 import static org.hamcrest.core.IsEqual.equalTo;
19 assertThat("identifier", actual, equalTo(expected));
37 assertThat(actual, equalTo(expected));
94 assertThat(1, equalTo((Number) 1));
  /external/hamcrest/hamcrest-library/src/test/java/org/hamcrest/beans/
HasPropertyWithValueTest.java 16 import static org.hamcrest.core.IsEqual.equalTo;
37 assertMatches("with property", hasProperty("property", equalTo("is expected")), shouldMatch);
39 hasProperty("property", equalTo("is expected")), shouldNotMatch);
43 assertMatches("with bean info", hasProperty("property", equalTo("with info")), beanWithInfo);
45 hasProperty("property", equalTo("without info")), beanWithInfo);
59 assertDescription("hasProperty(\"property\", <true>)", hasProperty("property", equalTo(true)));
84 assertThat(new X(), HasPropertyWithValue.hasProperty("test", IsEqual.equalTo(1)));
  /cts/hostsidetests/appsecurity/test-apps/IsolatedSplitApp/src/com/android/cts/isolatedsplitapp/
SplitAppTest.java 89 assertThat(resources.getString(R.string.base_string), equalTo("Base String Default"));
103 assertThat(resources.getString(R.string.base_string), equalTo("Base String Polish"));
118 assertThat(resources.getString(R.string.base_string), equalTo("Base String Default"));
121 assertThat(resources.getString(resourceId), equalTo("Feature A String Default"));
134 assertThat(resources.getString(R.string.base_string), equalTo("Base String Polish"));
137 assertThat(resources.getString(resourceId), equalTo("Feature A String Polish"));
148 assertThat(results.getString("base"), equalTo("Base String Default"));
149 assertThat(results.getString("feature_a"), equalTo("Feature A String Default"));
162 assertThat(resources.getString(R.string.base_string), equalTo("Base String Default"));
165 assertThat(resources.getString(resourceId), equalTo("Feature A String Default"))
    [all...]
  /external/hamcrest/hamcrest-core/src/main/java/org/hamcrest/core/
IsNot.java 7 import static org.hamcrest.core.IsEqual.equalTo;
35 * <pre>assertThat(cheese, is(not(equalTo(smelly))))</pre>
45 * A shortcut to the frequently used <code>not(equalTo(x))</code>.
49 * <pre>assertThat(cheese, is(not(equalTo(smelly))))</pre>
55 return not(equalTo(value));

Completed in 158 milliseconds

1 2 3 4 5