/frameworks/native/libs/vr/libdvrcommon/include/private/dvr/test/ |
D | test_macros.h | 16 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/ |
D | pose_test.cpp | 29 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/ |
D | ScreenshotUtils.h | 100 void expectColor(const Rect& rect, const Color& color, uint8_t tolerance = 0) { 104 TransactionUtils::expectBufferColor(mOutBuffer, mPixels, rect, color, tolerance); 107 void expectBorder(const Rect& rect, const Color& color, uint8_t tolerance = 0) { 123 expectColor(top, color, tolerance); 127 expectColor(left, color, tolerance); 131 expectColor(right, color, tolerance); 141 expectColor(bottom, color, tolerance); 147 uint8_t tolerance = 0) { 156 tolerance); 158 tolerance); [all …]
|
D | TransactionUtils.h | 104 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/ |
D | AvoidXfermode.java | 54 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/ |
D | SyncParams.java | 231 public SyncParams setTolerance(float tolerance) { in setTolerance() argument 232 if (tolerance < 0.f || tolerance >= 1.f) { in setTolerance() 235 mTolerance = tolerance; in setTolerance()
|
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/compatui/ |
D | CompatUIConfiguration.java | 117 final int tolerance = context.getResources().getInteger( in CompatUIConfiguration() local 119 mHideSizeCompatRestartButtonTolerance = getHideSizeCompatRestartButtonTolerance(tolerance); in CompatUIConfiguration() 245 private int getHideSizeCompatRestartButtonTolerance(int tolerance) { in getHideSizeCompatRestartButtonTolerance() argument 246 return tolerance < 0 || tolerance > MAX_PERCENTAGE_VAL ? MAX_PERCENTAGE_VAL : tolerance; in getHideSizeCompatRestartButtonTolerance()
|
/frameworks/native/libs/gui/tests/ |
D | GLTest.cpp | 170 int r, int g, int b, int a, int tolerance) { in checkPixel() argument 182 if (r >= 0 && abs(r - int(pixel[0])) > tolerance) { in checkPixel() 185 if (g >= 0 && abs(g - int(pixel[1])) > tolerance) { in checkPixel() 191 if (b >= 0 && abs(b - int(pixel[2])) > tolerance) { in checkPixel() 197 if (a >= 0 && abs(a - int(pixel[3])) > tolerance) { in checkPixel() 211 int tolerance) { in assertRectEq() argument 214 if (abs(r1.left - r2.left) > tolerance) { in assertRectEq() 217 if (abs(r1.top - r2.top) > tolerance) { in assertRectEq() 223 if (abs(r1.right - r2.right) > tolerance) { in assertRectEq() 229 if (abs(r1.bottom - r2.bottom) > tolerance) { in assertRectEq()
|
D | GLTest.h | 56 int r, int g, int b, int a, int tolerance = 2); 58 int tolerance = 1);
|
/frameworks/base/test-base/src/android/test/ |
D | InstrumentationTestCase.java | 181 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()
|
D | FlakyTest.java | 46 int tolerance() default 1; in tolerance() method
|
/frameworks/base/core/tests/utillib/src/android/test/ |
D | BandwidthTestCase.java | 66 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/ |
D | OnBackAnimationCallbackExtensionTest.kt | 58 val tolerance = 0.0001f in onBackProgressed_shouldInvoke_onBackProgress() constant 59 assertThat(actual.translateX).isWithin(tolerance).of(0f) in onBackProgressed_shouldInvoke_onBackProgress() 60 assertThat(actual.translateY).isWithin(tolerance).of(0f) in onBackProgressed_shouldInvoke_onBackProgress() 61 assertThat(actual.scale).isWithin(tolerance).of(1f) in onBackProgressed_shouldInvoke_onBackProgress()
|
D | BackAnimationSpecTest.kt | 137 val tolerance = 0f in assertBackTransformation() constant 141 assertThat(actual.translateX).isWithin(tolerance).of(expected.translateX) in assertBackTransformation() 146 assertThat(actual.translateY).isWithin(tolerance).of(expected.translateY) in assertBackTransformation() 148 assertThat(actual.scale).isWithin(tolerance).of(expected.scale) in assertBackTransformation()
|
/frameworks/base/packages/SystemUI/compose/scene/tests/src/com/android/compose/test/subjects/ |
D | DpOffsetSubject.kt | 37 fun isWithin(tolerance: Dp): TolerantDpOffsetComparison { in isWithin() 40 actual.x.assertIsEqualTo(expected.x, "offset.x", tolerance) in isWithin() 41 actual.y.assertIsEqualTo(expected.y, "offset.y", tolerance) in isWithin()
|
/frameworks/base/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/subjects/ |
D | TransitionStateSubject.kt | 87 fun hasProgress(progress: Float, tolerance: Float = 0f) { in hasProgress() 88 check("progress").that(actual.progress).isWithin(tolerance).of(progress) in hasProgress() 91 fun hasProgressVelocity(progressVelocity: Float, tolerance: Float = 0f) { in hasProgressVelocity() 94 .isWithin(tolerance) in hasProgressVelocity()
|
/frameworks/base/media/jni/ |
D | android_media_SyncParams.cpp | 38 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()
|
D | android_media_SyncParams.h | 41 jfieldID tolerance; member
|
/frameworks/av/media/libaaudio/tests/ |
D | test_flowgraph.cpp | 238 constexpr float tolerance = 0.0001f; // arbitrary in TEST() local 251 EXPECT_NEAR(value * initialTarget, output[0], tolerance); in TEST() 262 EXPECT_NEAR(expected, output[i], tolerance); in TEST() 266 EXPECT_NEAR(expected, output[i], tolerance); in TEST() 315 constexpr float tolerance = 0.000001f; // arbitrary in TEST() local 317 EXPECT_NEAR(expected[i], output[i], tolerance); in TEST() 340 constexpr float tolerance = 0.000001f; // arbitrary in TEST() local 342 EXPECT_NEAR(expected[i], output[i], tolerance); in TEST() 400 constexpr float tolerance = 0.00001f; in TEST() local 417 EXPECT_NEAR(expected[i], output[i], tolerance); in TEST()
|
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/data/ |
D | DataConfigManagerTest.java | 107 int tolerance = 100; in testParseAutoDataSwitchScoreTable() local 118 .auto_data_switch_score_tolerance, tolerance); in testParseAutoDataSwitchScoreTable() 123 assertThat(mDataConfigManagerUT.getAutoDataSwitchScoreTolerance()).isEqualTo(tolerance); in testParseAutoDataSwitchScoreTable()
|
/frameworks/base/test-base/hiddenapi/src/android/test/ |
D | InstrumentationTestCase.java | 36 private void runMethod(Method runMethod, int tolerance) throws Throwable { in runMethod() argument
|
/frameworks/base/tools/aapt/ |
D | Main.cpp | 282 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/ |
D | SGEMMTest.java | 84 float tolerance = allowedError * (l2NormOut < l2NormRef ? l2NormOut : l2NormRef); in testWithTolerance() local 85 tolerance /= m * n; in testWithTolerance() 89 if (absErr > tolerance) { in testWithTolerance()
|
/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/helpers/ |
D | CameraErrorCollector.java | 293 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/ |
D | Vector3Test.java | 28 private static final float tolerance = 1.0f / (1 << 12); field in Vector3Test 47 return Math.abs(a - b) <= tolerance; in nearlyEqual()
|