Lines Matching refs:value
86 * Adds a failure to the table if {@code matcher} does not match {@code value}.
91 public <T> void checkThat(final T value, final Matcher<T> matcher) {
92 super.checkThat(mCameraMsg, value, matcher);
97 * {@code matcher} does not match {@code value}. Execution continues, but
102 public <T> void checkThat(final String reason, final T value, final Matcher<T> matcher) {
103 super.checkThat(mCameraMsg + reason, value, matcher);
141 * @param expected Expected value to be checked against.
142 * @param actual Actual value to be checked.
149 throw new IllegalArgumentException("expected value shouldn't be null");
165 * @param expected Expected value to be checked against.
166 * @param actual Actual value to be checked.
191 throw new IllegalArgumentException("expected value shouldn't be null");
216 throw new IllegalArgumentException("expected value shouldn't be null");
229 * Check that the {@code actual} value is greater than the {@code expected} value.
232 * @param expected The expected value to check that the actual value is larger than.
233 * @param actual Actual value to check.
243 * Check that the {@code actual} value is greater than or equal to the {@code expected} value.
246 * @param expected The expected value to check that the actual value is larger than or equal to.
247 * @param actual Actual value to check.
257 * Check that the {@code actual} value is less than the {@code expected} value.
260 * @param expected The expected value to check that the actual value is less than.
261 * @param actual Actual value to check.
271 * Check that the {@code actual} value is less than or equal to the {@code expected} value.
274 * @param expected The expected value to check that the actual value is less than or equal to.
275 * @param actual Actual value to check.
288 * @param expected Expected value to be checked against.
289 * @param actual Actual value to be checked.
311 * @param expected Expected value to be checked against.
312 * @param actual Actual value to be checked.
331 * Check that all values in the list are greater than or equal to the min value.
335 * @param min The smallest allowed value
339 for (T value : list) {
340 expectTrue(msg + String.format(", array value " + value.toString() +
342 min.toString()), value.compareTo(min) >= 0);
347 * Check that all values in the array are greater than or equal to the min value.
351 * @param min The smallest allowed value
363 * @param min The min value of the range
364 * @param max The max value of the range
368 for (T value : list) {
369 expectTrue(msg + String.format(", array value " + value.toString() +
372 value.compareTo(max)<= 0 && value.compareTo(min) >= 0);
381 * @param min The min value of the range
382 * @param max The max value of the range
394 * @param min The min value of the range
395 * @param max The max value of the range
406 * Expect the value is in the range.
409 * @param value The value to be checked
410 * @param min The min value of the range
411 * @param max The max value of the range
413 * @return {@code true} if the value was in range, {@code false} otherwise
415 public <T extends Comparable<? super T>> boolean expectInRange(String msg, T value,
417 return expectTrue(msg + String.format(", value " + value.toString()
420 value.compareTo(max)<= 0 && value.compareTo(min) >= 0);
488 * @param expected The reference 'expected' value to be used to check against
489 * @param actual The actual value that was received
535 * @param expected The reference 'expected' value to be used to check against
536 * @param actual The actual value that was received
564 * @param actual The actual value that was received
633 * Check if the key value is not null and return the value.
638 * @return The value of the key.
643 T value = characteristics.get(key);
644 if (value == null) {
648 return value;
652 * Check if the key value is not null and return the value.
657 * @return The value of the key.
662 T value = request.get(key);
663 if (value == null) {
667 return value;
671 * Check if the key value is not null and return the value.
675 * @return The value of the key.
679 T value = request.get(key);
680 if (value == null) {
684 return value;
688 * Check if the key value is not null and return the value.
692 * @return The value of the key.
699 * Check if the key value is not null and return the value.
704 * @return The value of the key.
708 T value = result.get(key);
709 if (value == null) {
713 return value;
717 * Check if the key is non-null and the value is not equal to target.
721 * @param expected The expected value of the CaptureRequest key.
729 T value;
730 if ((value = expectKeyValueNotNull(request, key)) == null) {
734 String reason = "Key " + key.getName() + " shouldn't have value " + value.toString();
735 checkThat(reason, value, CoreMatchers.not(expected));
739 * Check if the key is non-null and the value is not equal to target.
743 * @param expected The expected value of the CaptureResult key.
751 T value;
752 if ((value = expectKeyValueNotNull(result, key)) == null) {
756 String reason = "Key " + key.getName() + " shouldn't have value " + value.toString();
757 checkThat(reason, value, CoreMatchers.not(expected));
761 * Check if the value is non-null and the value is equal to target.
763 * @param result The {@link CaptureResult} to lookup the value in.
765 * @param expected The expected value of the {@link CaptureResult} key.
773 T value;
774 if ((value = expectKeyValueNotNull(result, key)) == null) {
778 String reason = "Key " + key.getName() + " value " + value.toString()
779 + " doesn't match the expected value " + expected.toString();
780 checkThat(reason, value, CoreMatchers.equalTo(expected));
784 * Check if the key is non-null and the value is equal to target.
790 * @param expected The expected value of the CaptureRequest key.
797 T value;
798 if ((value = expectKeyValueNotNull(request, key)) == null) {
802 String reason = "Key " + key.getName() + " value " + value.toString()
803 + " doesn't match the expected value " + expected.toString();
804 checkThat(reason, value, CoreMatchers.equalTo(expected));
808 * Check if the key is non-null, and the key value is greater than the expected value.
812 * @param expected The expected to be compared to the value for the given key.
816 T value;
817 if ((value = expectKeyValueNotNull(result, key)) == null) {
821 expectGreaterOrEqual(key.getName(), expected, value);
825 * Check if the key is non-null, and the key value is greater than the expected value.
829 * @param expected The expected to be compared to the value for the given key.
833 T value;
834 if ((value = expectKeyValueNotNull(characteristics, key)) == null) {
838 expectGreater(key.getName(), expected, value);
842 * Check if the key is non-null, and the key value is in the expected range.
846 * @param min The min value of the range
847 * @param max The max value of the range
851 T value;
852 if ((value = expectKeyValueNotNull(characteristics, key)) == null) {
855 expectInRange(key.getName(), value, min, max);
859 * Check if the key is non-null, and the key value is one of the expected values.
867 T value = expectKeyValueNotNull(characteristics, key);
868 if (value == null) {
871 String reason = "Key " + key.getName() + " value " + value
873 expectContains(reason, expected, value);
877 * Check if the key is non-null, and the key value is one of the expected values.
884 T value = expectKeyValueNotNull(request, key);
885 if (value == null) {
888 String reason = "Key " + key.getName() + " value " + value
890 expectContains(reason, expected, value);
894 * Check if the key is non-null, and the key value contains the expected element.
898 * @param expected The expected element to be contained in the value for the given key.
902 T[] value;
903 if ((value = expectKeyValueNotNull(characteristics, key)) == null) {
906 String reason = "Key " + key.getName() + " value " + value
907 + " doesn't contain the expected value " + expected;
908 expectContains(reason, value, expected);
912 * Check if the key is non-null, and the key value contains the expected element.
916 * @param expected The expected element to be contained in the value for the given key.
920 int[] value;
921 if ((value = expectKeyValueNotNull(characteristics, key)) == null) {
924 String reason = "Key " + key.getName() + " value " + value
925 + " doesn't contain the expected value " + expected;
926 expectContains(reason, value, expected);
930 * Check if the key is non-null, and the key value contains the expected element.
934 * @param expected The expected element to be contained in the value for the given key.
938 boolean[] value;
939 if ((value = expectKeyValueNotNull(characteristics, key)) == null) {
942 String reason = "Key " + key.getName() + " value " + value
943 + " doesn't contain the expected value " + expected;
944 expectContains(reason, value, expected);
952 * @param expected the value to check.
962 String reason = "Expected value " + expected
987 * @param expected the value to check.
998 String reason = "Expected value " + expected
1023 * @param expected the value to check.
1039 * @param expected the value to check.
1042 String reason = "Expected value " + expected