Home
last modified time | relevance | path

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

12

/frameworks/native/libs/vr/libdvrcommon/include/private/dvr/test/
Dtest_macros.h16 const A& expected, const B& actual, const T& tolerance) { in CmpArrayLikeFloatEq() argument
18 if (!IsEqual(expected[i], actual[i], tolerance)) { in CmpArrayLikeFloatEq()
21 << "\" differ at element " << i << " by at least " << tolerance in CmpArrayLikeFloatEq()
34 const A& expected, const B& actual, const T& tolerance) { in CmpMatrixLikeFloatEq() argument
37 if (!IsEqual(expected(r, c), actual(r, c), tolerance)) { in CmpMatrixLikeFloatEq()
41 << " by at least " << tolerance << " : " in CmpMatrixLikeFloatEq()
54 const A& expected, const B& actual, const T& tolerance) { in CmpArrayLikeFloatNe() argument
56 if (!IsEqual(expected[i], actual[i], tolerance)) { in CmpArrayLikeFloatNe()
64 << "\" by at least " << tolerance << "."; in CmpArrayLikeFloatNe()
72 const A& expected, const B& actual, const T& tolerance) { in CmpMatrixLikeFloatNe() argument
[all …]
/frameworks/native/libs/vr/libdvrcommon/tests/
Dpose_test.cpp29 const auto tolerance = FT(0.0001); in TYPED_TEST() local
39 EXPECT_MAT4_NEAR(result_pose, mat4_t::Identity(), tolerance); in TYPED_TEST()
48 const auto tolerance = FT(0.0001); in TYPED_TEST() local
62 EXPECT_VEC3_NEAR(expected_transformed, actual_transformed, tolerance); in TYPED_TEST()
72 const auto tolerance = FT(0.0001); in TYPED_TEST() local
86 EXPECT_VEC3_NEAR(expected_rotated, actual_rotated, tolerance); in TYPED_TEST()
96 const auto tolerance = FT(0.0001); in TYPED_TEST() local
117 EXPECT_VEC3_NEAR(expected_transformed, actual_transformed, tolerance); in TYPED_TEST()
127 const auto tolerance = FT(0.0001); in TYPED_TEST() local
141 EXPECT_VEC3_NEAR(start_position, inverted, tolerance); in TYPED_TEST()
[all …]
/frameworks/native/services/surfaceflinger/tests/utils/
DScreenshotUtils.h91 void expectColor(const Rect& rect, const Color& color, uint8_t tolerance = 0) {
95 TransactionUtils::expectBufferColor(mOutBuffer, mPixels, rect, color, tolerance);
98 void expectBorder(const Rect& rect, const Color& color, uint8_t tolerance = 0) {
114 expectColor(top, color, tolerance);
118 expectColor(left, color, tolerance);
122 expectColor(right, color, tolerance);
132 expectColor(bottom, color, tolerance);
138 uint8_t tolerance = 0) {
147 tolerance);
149 tolerance);
[all …]
DTransactionUtils.h104 const Rect& rect, const Color& color, uint8_t tolerance) { in expectBufferColor() argument
121 auto colorCompare = [tolerance](uint8_t a, uint8_t b) { in expectBufferColor()
123 return tmp <= tolerance; in expectBufferColor()
/frameworks/base/graphics/java/android/graphics/
DAvoidXfermode.java54 public AvoidXfermode(int opColor, int tolerance, Mode mode) { in AvoidXfermode() argument
55 if (tolerance < 0 || tolerance > 255) { in AvoidXfermode()
/frameworks/base/media/java/android/media/
DSyncParams.java231 public SyncParams setTolerance(float tolerance) { in setTolerance() argument
232 if (tolerance < 0.f || tolerance >= 1.f) { in setTolerance()
235 mTolerance = tolerance; in setTolerance()
/frameworks/native/libs/gui/tests/
DGLTest.cpp178 int r, int g, int b, int a, int tolerance) { in checkPixel() argument
190 if (r >= 0 && abs(r - int(pixel[0])) > tolerance) { in checkPixel()
193 if (g >= 0 && abs(g - int(pixel[1])) > tolerance) { in checkPixel()
199 if (b >= 0 && abs(b - int(pixel[2])) > tolerance) { in checkPixel()
205 if (a >= 0 && abs(a - int(pixel[3])) > tolerance) { in checkPixel()
219 int tolerance) { in assertRectEq() argument
222 if (abs(r1.left - r2.left) > tolerance) { in assertRectEq()
225 if (abs(r1.top - r2.top) > tolerance) { in assertRectEq()
231 if (abs(r1.right - r2.right) > tolerance) { in assertRectEq()
237 if (abs(r1.bottom - r2.bottom) > tolerance) { in assertRectEq()
DGLTest.h56 int r, int g, int b, int a, int tolerance = 2);
58 int tolerance = 1);
/frameworks/base/test-base/src/android/test/
DInstrumentationTestCase.java181 runCount = method.getAnnotation(FlakyTest.class).tolerance(); in runTest()
188 final int tolerance = runCount; in runTest() local
195 runMethod(testMethod, tolerance, repetitive); in runTest()
210 private void runMethod(Method runMethod, int tolerance) throws Throwable { in runMethod() argument
211 runMethod(runMethod, tolerance, false); in runMethod()
214 private void runMethod(Method runMethod, int tolerance, boolean isRepetitive) throws Throwable { in runMethod() argument
237 } while ((runCount < tolerance) && (isRepetitive || exception != null)); in runMethod()
DFlakyTest.java46 int tolerance() default 1; in tolerance() method
/frameworks/base/core/tests/utillib/src/android/test/
DBandwidthTestCase.java66 runCount = method.getAnnotation(FlakyTest.class).tolerance(); in runTest()
73 final int tolerance = runCount; in runTest() local
80 runMethod(testMethod, tolerance, repetitive); in runTest()
116 private void runMethod(Method runMethod, int tolerance, boolean isRepetitive) throws Throwable { in runMethod() argument
140 } while ((runCount < tolerance) && (isRepetitive || exception != null)); in runMethod()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/animation/back/
DBackAnimationSpecTest.kt83 val tolerance = 0f in assertBackTransformation() constant
84 assertThat(actual.translateX).isWithin(tolerance).of(expected.translateX) in assertBackTransformation()
85 assertThat(actual.translateY).isWithin(tolerance).of(expected.translateY) in assertBackTransformation()
86 assertThat(actual.scale).isWithin(tolerance).of(expected.scale) in assertBackTransformation()
/frameworks/av/media/libaaudio/tests/
Dtest_flowgraph.cpp214 constexpr float tolerance = 0.0001f; // arbitrary in TEST() local
227 EXPECT_NEAR(value * initialTarget, output[0], tolerance); in TEST()
238 EXPECT_NEAR(expected, output[i], tolerance); in TEST()
242 EXPECT_NEAR(expected, output[i], tolerance); in TEST()
291 constexpr float tolerance = 0.000001f; // arbitrary in TEST() local
293 EXPECT_NEAR(expected[i], output[i], tolerance); in TEST()
316 constexpr float tolerance = 0.000001f; // arbitrary in TEST() local
318 EXPECT_NEAR(expected[i], output[i], tolerance); in TEST()
/frameworks/base/media/jni/
Dandroid_media_SyncParams.cpp38 tolerance = env->GetFieldID(clazz, "mTolerance", "F"); in init()
62 sync.mTolerance = env->GetFloatField(params, fields.tolerance); in fillFromJobject()
79 env->SetFloatField(params, fields.tolerance, (jfloat)sync.mTolerance); in asJobject()
Dandroid_media_SyncParams.h41 jfieldID tolerance; member
/frameworks/base/test-base/hiddenapi/src/android/test/
DInstrumentationTestCase.java36 private void runMethod(Method runMethod, int tolerance) throws Throwable { in runMethod() argument
/frameworks/base/tools/aapt/
DMain.cpp282 int tolerance = 0; in main() local
354 tolerance = atoi(argv[0]); in main()
355 bundle.setGrayscaleTolerance(tolerance); in main()
356 … printf("%s: Images with deviation <= %d will be forced to grayscale.\n", prog, tolerance); in main()
/frameworks/rs/tests/java_api/RsBLAS_Benchmark/src/com/example/android/rs/blasbenchmark/
DSGEMMTest.java84 float tolerance = allowedError * (l2NormOut < l2NormRef ? l2NormOut : l2NormRef); in testWithTolerance() local
85 tolerance /= m * n; in testWithTolerance()
89 if (absErr > tolerance) { in testWithTolerance()
/frameworks/base/packages/BackupEncryption/test/robolectric/src/com/android/server/backup/encryption/chunking/cdc/
DFingerprintMixerTest.java140 float tolerance = 0.1f; in mix_randomlyDistributesBits() local
154 assertThat(diff).isLessThan(tolerance); in mix_randomlyDistributesBits()
/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/helpers/
DCameraErrorCollector.java293 public <T> boolean expectEquals(String msg, float expected, float actual, float tolerance) { in expectEquals() argument
298 if (!(Math.abs(expected - actual) <= tolerance)) { in expectEquals()
300 expected, actual, tolerance)); in expectEquals()
316 public <T> boolean expectEquals(String msg, double expected, double actual, double tolerance) { in expectEquals() argument
321 if (!(Math.abs(expected - actual) <= tolerance)) { in expectEquals()
323 expected, actual, tolerance)); in expectEquals()
/frameworks/base/services/tests/servicestests/src/com/android/server/
DVector3Test.java28 private static final float tolerance = 1.0f / (1 << 12); field in Vector3Test
47 return Math.abs(a - b) <= tolerance; in nearlyEqual()
/frameworks/native/services/surfaceflinger/tests/
DLayerRenderTypeTransaction_test.cpp477 const uint8_t tolerance = 1; in TEST_P() local
481 getScreenCapture()->expectColor(Rect(0, 0, 32, 32), expected, tolerance); in TEST_P()
674 const uint8_t tolerance = 1; in TEST_P() local
681 tolerance); in TEST_P()
700 const uint8_t tolerance = 1; in TEST_P() local
708 tolerance); in TEST_P()
1496 const uint8_t tolerance = 1; in TEST_P() local
1501 getScreenCapture()->expectColor(Rect(0, 0, 32, 32), expectedColor, tolerance); in TEST_P()
1554 const uint8_t tolerance = 1; in TEST_P() local
1562 getScreenCapture()->expectColor(Rect(0, 0, 32, 32), expectedColor, tolerance); in TEST_P()
[all …]
/frameworks/base/core/tests/coretests/src/android/graphics/
DBitmapTest.java201 final int tolerance = 1; in testSetPixelsWithNonOpaqueAlpha() local
220 assertTrue("red", Math.abs(rr - r1) <= tolerance); in testSetPixelsWithNonOpaqueAlpha()
225 assertTrue("green", Math.abs(gg - g1) <= tolerance); in testSetPixelsWithNonOpaqueAlpha()
230 assertTrue("blue", Math.abs(bb - b1) <= tolerance); in testSetPixelsWithNonOpaqueAlpha()
/frameworks/native/services/surfaceflinger/tests/unittests/
DVSyncPredictorTest.cpp39 MATCHER_P2(IsCloseTo, value, tolerance, "is within tolerance") {
40 return arg <= value + tolerance && arg >= value - tolerance;
/frameworks/native/libs/input/tests/
DVelocityTracker_test.cpp54 float tolerance = fabsf(target * fraction); in EXPECT_NEAR_BY_FRACTION() local
60 tolerance = 1E-6; in EXPECT_NEAR_BY_FRACTION()
62 EXPECT_NEAR(actual, target, tolerance); in EXPECT_NEAR_BY_FRACTION()

12