Home
last modified time | relevance | path

Searched refs:tolerance (Results 1 – 25 of 26) sorted by relevance

12

/cts/common/device-side/util/src/com/android/compatibility/common/util/
DColorUtils.java34 public static void verifyColor(int expected, int observed, int tolerance) { in verifyColor() argument
35 verifyColor("", expected, observed, tolerance); in verifyColor()
46 public static void verifyColor(@NonNull String s, int expected, int observed, int tolerance) { in verifyColor() argument
49 + ", tolerated channel error 0x" + tolerance; in verifyColor()
50 String red = verifyChannel("red", expected, observed, tolerance, (i) -> Color.red(i)); in verifyColor()
51 String green = verifyChannel("green", expected, observed, tolerance, (i) -> Color.green(i)); in verifyColor()
52 String blue = verifyChannel("blue", expected, observed, tolerance, (i) -> Color.blue(i)); in verifyColor()
53 String alpha = verifyChannel("alpha", expected, observed, tolerance, (i) -> Color.alpha(i)); in verifyColor()
72 int tolerance, IntUnaryOperator f) { in verifyChannel() argument
75 if (Math.abs(e - o) <= tolerance) { in verifyChannel()
[all …]
/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/
DColorUtils.java34 public static void verifyColor(int expected, int observed, int tolerance) { in verifyColor() argument
35 verifyColor("", expected, observed, tolerance); in verifyColor()
46 public static void verifyColor(@NonNull String s, int expected, int observed, int tolerance) { in verifyColor() argument
49 + ", tolerated channel error 0x" + tolerance; in verifyColor()
50 String red = verifyChannel("red", expected, observed, tolerance, (i) -> Color.red(i)); in verifyColor()
51 String green = verifyChannel("green", expected, observed, tolerance, (i) -> Color.green(i)); in verifyColor()
52 String blue = verifyChannel("blue", expected, observed, tolerance, (i) -> Color.blue(i)); in verifyColor()
53 String alpha = verifyChannel("alpha", expected, observed, tolerance, (i) -> Color.alpha(i)); in verifyColor()
72 int tolerance, IntUnaryOperator f) { in verifyChannel() argument
75 if (Math.abs(e - o) <= tolerance) { in verifyChannel()
[all …]
/cts/tests/tests/renderscript/src/android/renderscript/cts/
Dfloat16_gen.c122 void getErrorBar(unsigned short value, int tolerance, unsigned short bounds[2]) { in getErrorBar() argument
124 if (tolerance != 1 && tolerance != 3) { in getErrorBar()
126 tolerance); in getErrorBar()
160 half lb = hValue - tolerance * ulp; in getErrorBar()
161 half ub = hValue + tolerance * ulp; in getErrorBar()
226 int tolerance) { in printReferenceOutput() argument
237 getErrorBar(result, tolerance, resultBounds); in printReferenceOutput()
/cts/tests/tests/media/src/android/media/cts/
DFaceDetector_FaceTest.java58 float tolerance = 5f; in testFaceProperties() local
62 assertEquals(eyesDistance, face.eyesDistance(), tolerance); in testFaceProperties()
65 assertEquals(eyesMidpointX, eyesMP.x, tolerance); in testFaceProperties()
66 assertEquals(eyesMidpointY, eyesMP.y, tolerance); in testFaceProperties()
DMediaPlayerTest.java203 final int tolerance = 70; in testPlayAudioFromDataURI() local
231 assertEquals(mp3Duration, mp.getDuration(), tolerance); in testPlayAudioFromDataURI()
237 assertEquals(pos + seekDuration, mp.getCurrentPosition(), tolerance); in testPlayAudioFromDataURI()
280 int mp3Duration, int tolerance, int seekDuration) throws Exception {
295 assertEquals(mp3Duration, mp.getDuration(), tolerance);
301 assertEquals(pos + seekDuration, mp.getCurrentPosition(), tolerance);
332 final int tolerance = 70;
359 assertEquals(pos + SLEEP_TIME, mp.getCurrentPosition(), tolerance);
406 final int tolerance = 70; in testPlayMidi() local
420 assertEquals(midiDuration, mp.getDuration(), tolerance); in testPlayMidi()
[all …]
DMediaRecorderTest.java749 private void checkRecordedTime(long expectedMs, long actualMs, long tolerance) { in checkRecordedTime() argument
750 assertEquals(expectedMs, actualMs, tolerance); in checkRecordedTime()
752 assertEquals(actualFileDurationMs, actualMs, tolerance); in checkRecordedTime()
768 long fileSize, long tolerance) throws Exception { in testSetMaxFileSize() argument
795 checkOutputFileSize(OUTPUT_PATH, fileSize, tolerance); in testSetMaxFileSize()
983 long tolerance = 50 * 1024; in testRecordExceedFileSizeLimit() local
1117 checkOutputFileSize(filePath, fileSize, tolerance); in testRecordExceedFileSizeLimit()
1121 private void checkOutputFileSize(final String fileName, long fileSize, long tolerance) { in checkOutputFileSize() argument
1124 assertEquals(fileSize, file.length(), tolerance); in checkOutputFileSize()
DMediaSyncTest.java442 final double tolerance = state.mMediaDurationUs in playAV() local
451 + ", tolerance " + tolerance + "\n"; in playAV()
454 if (Math.abs(diff) <= tolerance) { in playAV()
/cts/tests/tests/uirendering/src/android/uirendering/cts/bitmapverifiers/
DSamplePointVerifier.java40 public SamplePointVerifier(Point[] testPoints, int[] expectedColors, int tolerance) { in SamplePointVerifier() argument
43 mTolerance = tolerance; in SamplePointVerifier()
83 int tolerance, VerifyPixelColor verifier) { in create() argument
84 return new SamplePointVerifier(testPoints, expectedColors, tolerance) { in create()
DRectVerifier.java32 public RectVerifier(int outerColor, int innerColor, Rect innerRect, int tolerance) { in RectVerifier() argument
33 super(tolerance); in RectVerifier()
/cts/tests/tests/uirendering27/src/android/uirendering/cts/bitmapverifiers/
DSamplePointVerifier.java40 public SamplePointVerifier(Point[] testPoints, int[] expectedColors, int tolerance) { in SamplePointVerifier() argument
43 mTolerance = tolerance; in SamplePointVerifier()
83 int tolerance, VerifyPixelColor verifier) { in create() argument
84 return new SamplePointVerifier(testPoints, expectedColors, tolerance) { in create()
DRectVerifier.java32 public RectVerifier(int outerColor, int innerColor, Rect innerRect, int tolerance) { in RectVerifier() argument
33 super(tolerance); in RectVerifier()
/cts/tests/tests/view/src/android/view/cts/
DVelocityTrackerTest.java219 private void assertVelocity(float tolerance, String message) { in assertVelocity() argument
225 if (errorVx > tolerance || errorVy > tolerance) { in assertVelocity()
229 tolerance * 100.0f, mVx, mVy, in assertVelocity()
/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/
DGetPasswordExpirationTest.java51 private void checkPasswordExpiration(String error, long timeout, long tolerance) { in checkPasswordExpiration() argument
54 ADMIN_RECEIVER_COMPONENT)) <= tolerance); in checkPasswordExpiration()
/cts/tests/tests/graphics/src/android/graphics/cts/
DSweepGradientTest.java99 private void verifyColors(int[] colors, float[] positions, int tolerance) { in verifyColors() argument
141 assertEquals(Color.alpha(color), Color.alpha(pixel), tolerance); in verifyColors() local
142 assertEquals(Color.red(color), Color.red(pixel), tolerance); in verifyColors() local
143 assertEquals(Color.green(color), Color.green(pixel), tolerance); in verifyColors() local
144 assertEquals(Color.blue(color), Color.blue(pixel), tolerance); in verifyColors() local
DBitmapTest.java784 int tolerance = 1; in testEraseColorLong() local
786 tolerance = 4; in testEraseColorLong()
788 tolerance = 3; in testEraseColorLong()
793 tolerance); in testEraseColorLong()
796 tolerance); in testEraseColorLong()
1153 int tolerance = 2; in testSetColorSpace() local
1157 mBitmap.getColor(5, 5), tolerance); in testSetColorSpace()
/cts/tests/tests/graphics/jni/
Dandroid_graphics_cts_MediaVulkanGpuTest.cpp38 bool fuzzyMatch(uint32_t value1, uint32_t value2, int32_t tolerance) { in fuzzyMatch() argument
46 if (std::abs(value1Masked - value2Masked) > tolerance) in fuzzyMatch()
/cts/tests/camera/utils/src/android/hardware/camera2/cts/helpers/
DCameraErrorCollector.java287 public <T> boolean expectEquals(String msg, float expected, float actual, float tolerance) { in expectEquals() argument
292 if (!(Math.abs(expected - actual) <= tolerance)) { in expectEquals()
294 expected, actual, tolerance)); in expectEquals()
310 public <T> boolean expectEquals(String msg, double expected, double actual, double tolerance) { in expectEquals() argument
315 if (!(Math.abs(expected - actual) <= tolerance)) { in expectEquals()
317 expected, actual, tolerance)); in expectEquals()
/cts/apps/CameraITS/pymodules/its/
Dcv2image.py301 tolerance = 0.1
302 if width < height * (1 - tolerance) or width > height * (1 + tolerance):
/cts/tests/tests/app.usage/src/android/app/usage/cts/
DNetworkUsageStatsTest.java279 NetworkCallback(long tolerance, URL url) { in NetworkCallback() argument
280 mTolerance = tolerance; in NetworkCallback()
323 private boolean shouldTestThisNetworkType(int networkTypeIndex, final long tolerance) in shouldTestThisNetworkType() argument
330 NetworkCallback callback = new NetworkCallback(tolerance, new URL(CHECK_CONNECTIVITY_URL)); in shouldTestThisNetworkType()
/cts/tests/media/jni/
DNativeMuxerTest.cpp282 int tolerance = in isSubsetOf() local
284 tolerance += 1; // rounding error in isSubsetOf()
299 tolerance) { in isSubsetOf()
/cts/tests/camera/src/android/hardware/camera2/cts/
DImageReaderTest.java631 double tolerance = IMAGE_DIFFERENCE_TOLERANCE; in testAllOutputYUVResolutions() local
633 tolerance = IMAGE_DIFFERENCE_TOLERANCE_LEGACY; in testAllOutputYUVResolutions()
637 if (difference > tolerance) { in testAllOutputYUVResolutions()
661 difference + ", tolerance is " + tolerance); in testAllOutputYUVResolutions()
/cts/tests/media/src/android/mediav2/cts/
DMuxerTest.java277 long tolerance = thisMime.startsWith("video/") ? STTS_TOLERANCE_US : 0; in isSubsetOf() local
279 tolerance += 1; // rounding error in isSubsetOf()
304 tolerance) { in isSubsetOf()
/cts/tests/camera/src/android/hardware/camera2/cts/rs/
DRawConverter.java593 double tolerance = 0.0001; in findDngInterpolationFactor() local
618 while (lastDiff > tolerance && loopLimit > 0) { in findDngInterpolationFactor()
/cts/tests/camera/utils/src/android/hardware/camera2/cts/
DCameraTestUtils.java2535 double tolerance = expected * EXIF_EXPOSURE_TIME_ERROR_MARGIN_RATIO; in verifyJpegExifExtraTags() local
2536 tolerance = Math.max(tolerance, EXIF_EXPOSURE_TIME_MIN_ERROR_MARGIN_SEC); in verifyJpegExifExtraTags()
2538 exposureTimeValue, tolerance); in verifyJpegExifExtraTags()
/cts/tests/tests/webkit/src/android/webkit/cts/
DWebViewTest.java1594 final int tolerance = 2; in testGetContentHeight() local
1607 tolerance * Math.max(mOnUiThread.getScale(), 1.0f)); in testGetContentHeight()
1645 <= tolerance; in testGetContentHeight()

12