Home
last modified time | relevance | path

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

12

/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 …]
DMediaPerfUtils.java168 double tolerance = FRAMERATE_TOLERANCE; in verifyAchievableFrameRates() local
170 tolerance *= EXTRA_TOLERANCE_BFRAMES; in verifyAchievableFrameRates()
172 double lowerBoundary1 = reported.getLower() / tolerance; in verifyAchievableFrameRates()
173 double upperBoundary1 = reported.getUpper() * tolerance; in verifyAchievableFrameRates()
174 double lowerBoundary2 = reported.getUpper() / Math.pow(tolerance, 2); in verifyAchievableFrameRates()
175 double upperBoundary2 = reported.getLower() * Math.pow(tolerance, 2); in verifyAchievableFrameRates()
/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/misc/src/android/media/misc/cts/
DFaceDetector_FaceTest.java61 float tolerance = 5f; in testFaceProperties() local
65 assertEquals(eyesDistance, face.eyesDistance(), tolerance); in testFaceProperties()
68 assertEquals(eyesMidpointX, eyesMP.x, tolerance); in testFaceProperties()
69 assertEquals(eyesMidpointY, eyesMP.y, tolerance); in testFaceProperties()
DMediaSyncTest.java441 final double tolerance = state.mMediaDurationUs in playAV() local
450 + ", tolerance " + tolerance + "\n"; in playAV()
453 if (Math.abs(diff) <= tolerance) { in playAV()
/cts/tests/input/src/android/input/cts/
DVelocityTrackerTest.kt357 private fun assertVelocity(tolerance: Float, message: String) { in assertVelocity()
361 assertVelocity({ mPlanarVelocityTracker.xVelocity }, tolerance, mVx, message) in assertVelocity()
362 assertVelocity(mPlanarVelocityTracker, MotionEvent.AXIS_X, tolerance, mVx, message) in assertVelocity()
364 assertVelocity({ mPlanarVelocityTracker.yVelocity }, tolerance, mVy, message) in assertVelocity()
365 assertVelocity(mPlanarVelocityTracker, MotionEvent.AXIS_Y, tolerance, mVy, message) in assertVelocity()
370 tolerance, in assertVelocity()
389 tolerance: Float, in assertVelocity()
395 tolerance, in assertVelocity()
403 tolerance: Float, in assertVelocity()
409 if (error > tolerance) { in assertVelocity()
[all …]
DMotionPredictorTest.kt240 val tolerance = Math.PI.toFloat() / 16 in testTiltOrientation() constant
241 assertEquals(tilt, predicted!!.getAxisValue(MotionEvent.AXIS_TILT, 0), tolerance) in testTiltOrientation()
242 assertEquals(orientation, predicted.getOrientation(0), tolerance) in testTiltOrientation()
/cts/tests/tests/uirendering/src/android/uirendering/cts/testclasses/
DColorFilterTests.java85 float tolerance = 0.002f; in testColorMatrixDoesNotClamp() local
87 assertEquals("red channel mismatch", expectedChannel, color.red(), tolerance); in testColorMatrixDoesNotClamp()
88 assertEquals("green channel mismatch", expectedChannel, color.green(), tolerance); in testColorMatrixDoesNotClamp()
89 assertEquals("blue channel mismatch", expectedChannel, color.blue(), tolerance); in testColorMatrixDoesNotClamp()
/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/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/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
/cts/tests/app/WallpaperTest/src/android/app/cts/wallpapers/util/
DWallpaperTestUtils.java77 float tolerance = 0.1f; in isSimilar() local
95 .anyMatch(delta -> delta / 255f > tolerance); in isSimilar()
/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/videocodec/src/android/videocodec/cts/
DVideoEncoderIntraFrameIntervalTest.java148 int tolerance = mEncCfgParams[0].mKeyFrameInterval == 0 ? 0 : mEncCfgParams[0].mMaxBFrames; in testEncoderSyncFrameSupport() local
157 Math.abs(maxKeyFrameDistance - expDistance) <= tolerance); in testEncoderSyncFrameSupport()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/audio/analyzers/
DBaseSineAnalyzer.java153 public void setTolerance(double tolerance) { in setTolerance() argument
154 mTolerance = tolerance; in setTolerance()
/cts/tests/camera/utils/src/android/hardware/camera2/cts/helpers/
DCameraErrorCollector.java353 public <T> boolean expectEquals(String msg, float expected, float actual, float tolerance) { in expectEquals() argument
358 if (!(Math.abs(expected - actual) <= tolerance)) { in expectEquals()
360 expected, actual, tolerance)); in expectEquals()
376 public <T> boolean expectEquals(String msg, double expected, double actual, double tolerance) { in expectEquals() argument
381 if (!(Math.abs(expected - actual) <= tolerance)) { in expectEquals()
383 expected, actual, tolerance)); in expectEquals()
/cts/apps/CtsVerifier/jni/audio_loopback/analyzer/
DGlitchAnalyzer.h49 void setTolerance(double tolerance) { in setTolerance() argument
50 mTolerance = tolerance; in setTolerance()
/cts/tests/media/src/android/mediav2/cts/
DAudioEncoderTest.java208 float tolerance = ACCEPTABLE_AV_SYNC_ERROR * mActiveEncCfg.mSampleRate in encodeAndValidate() local
210 if (mInputData.length > out.limit() + tolerance) { in encodeAndValidate()
/cts/tests/tests/security/src/android/security/cts/
DActivityManagerTest.java198 final double tolerance = 0.2d; in testActivityManager_appExitReasonPackageNames() local
205 assertTrue(Math.abs((double) mockPackagescores / totalLoops - 0.5d) < tolerance); in testActivityManager_appExitReasonPackageNames()
/cts/tests/tests/media/player/src/android/media/player/cts/
DMediaPlayerTest.java327 final int tolerance = 70; in testPlayAudioFromDataURI() local
353 assertEquals(mp3Duration, mp.getDuration(), tolerance); in testPlayAudioFromDataURI()
359 assertEquals(pos + seekDuration, mp.getCurrentPosition(), tolerance); in testPlayAudioFromDataURI()
405 int mp3Duration, int tolerance, int seekDuration) throws Exception {
422 assertEquals(mp3Duration, mp.getDuration(), tolerance);
428 assertEquals(pos + seekDuration, mp.getCurrentPosition(), tolerance);
555 final int tolerance = 70; in runMidiTest() local
570 assertEquals(midiDuration, mp.getDuration(), tolerance); in runMidiTest()
576 assertEquals(pos + seekDuration, mp.getCurrentPosition(), tolerance); in runMidiTest()
1105 final int tolerance = 150; in testVideoSurfaceResetting() local
[all …]
/cts/tests/tests/media/recorder/src/android/media/recorder/cts/
DMediaRecorderTest.java818 private void checkRecordedTime(long expectedMs, long actualMs, long tolerance) { in checkRecordedTime() argument
819 assertEquals(expectedMs, actualMs, tolerance); in checkRecordedTime()
821 assertEquals(actualFileDurationMs, actualMs, tolerance); in checkRecordedTime()
838 long fileSize, long tolerance) throws Exception { in testSetMaxFileSize() argument
865 checkOutputFileSize(OUTPUT_PATH, fileSize, tolerance); in testSetMaxFileSize()
1152 long tolerance = 400 * 1024; in testRecordExceedFileSizeLimit() local
1299 checkOutputFileSize(filePath, fileSize, tolerance); in testRecordExceedFileSizeLimit()
1303 private void checkOutputFileSize(final String fileName, long fileSize, long tolerance) { in checkOutputFileSize() argument
1306 assertEquals(fileSize, file.length(), tolerance); in checkOutputFileSize()
/cts/tests/accessibilityservice/src/android/accessibilityservice/cts/
DAccessibilityMagnificationTest.java1484 float tolerance = 0.01f; in testTextLocations_changeWhenMagnified()
1489 < tolerance in testTextLocations_changeWhenMagnified()
1493 < tolerance in testTextLocations_changeWhenMagnified()
1495 < tolerance in testTextLocations_changeWhenMagnified()
1497 < tolerance) { in testTextLocations_changeWhenMagnified()
1576 float tolerance = 0.01f; in testTextLocationsInWindow_noChangeWhenMagnified() local
1578 assertThat(initialLocations[i].top).isWithin(tolerance).of(finalLocations[i].top); in testTextLocationsInWindow_noChangeWhenMagnified()
1579 assertThat(initialLocations[i].bottom).isWithin(tolerance).of( in testTextLocationsInWindow_noChangeWhenMagnified()
1581 assertThat(initialLocations[i].left).isWithin(tolerance).of(finalLocations[i].left); in testTextLocationsInWindow_noChangeWhenMagnified()
1582 assertThat(initialLocations[i].right).isWithin(tolerance).of( in testTextLocationsInWindow_noChangeWhenMagnified()

12