/platform_testing/libraries/motion/src/platform/test/motion/golden/ |
D | DataPoint.kt | 30 sealed interface DataPoint<out T> { 35 fun <T> of(value: T?, type: DataPointType<T>): DataPoint<T> { in asJson() 43 fun <T> notFound(): DataPoint<T> { in asJson() 44 @Suppress("UNCHECKED_CAST") return NotFoundDataPoint.instance as NotFoundDataPoint<T> in asJson() 46 fun <T> nullValue(): DataPoint<T> { in asJson() 47 @Suppress("UNCHECKED_CAST") return NullDataPoint.instance as NullDataPoint<T> in asJson() 50 fun <T> unknownType(): DataPoint<T> { in asJson() 51 @Suppress("UNCHECKED_CAST") return UnknownType.instance as UnknownType<T> in asJson() 61 data class ValueDataPoint<T> internal constructor(val value: T & Any, val type: DataPointType<T>) : 62 DataPoint<T> { in <lambda>() [all …]
|
D | DataPointType.kt | 30 class DataPointType<T>( 32 private val jsonToValue: (jsonValue: Any) -> T, 33 private val valueToJson: (T) -> Any, 34 internal val ensureImmutable: (T & Any) -> T & Any = { it }, 36 fun makeDataPoint(nativeValue: T?): DataPoint<T> { in makeDataPoint() 40 fun fromJson(jsonValue: Any): DataPoint<T> { in fromJson() 53 fun toJson(value: T): Any = valueToJson(value) in toJson()
|
D | TimeSeriesCapture.kt | 24 class FeatureCapture<T, V : Any>( 26 private val captureFn: (T) -> DataPoint<V>, 28 fun capture(observed: T) = captureFn(observed) in capture() 31 class TimeSeriesCaptureScope<T>( in capture() 32 private val observing: T?, in capture() 46 fun feature(using: FeatureCapture<in T, *>, name: String = using.name) { in capture() 60 resolveRelated: (T) -> U?, in capture()
|
/platform_testing/libraries/flicker/utils/src/android/tools/traces/ |
D | WaitCondition.kt | 47 class WaitCondition<T> 49 private val supplier: () -> T, 50 private val condition: Condition<T>, 53 private val onFailure: ((T) -> Any)?, 54 private val onRetry: ((T) -> Any)?, 55 private val onSuccess: ((T) -> Any)?, 71 var currState: T? = null in doWaitFor() 92 private fun doWaitForRetry(retryNr: Int): Pair<Boolean, T> { in doWaitForRetry() 110 private fun doNotifyFailure(currState: T?) { in doNotifyFailure() 124 class Builder<T>(private val supplier: () -> T, private var retryLimit: Int) { [all …]
|
D | ConditionList.kt | 28 class ConditionList<T>(val conditions: List<Condition<T>>) : Condition<T>("", { false }) { in <lambda>() 29 constructor(vararg conditions: Condition<T>) : this(listOf(*conditions)) 40 override val condition: (T) -> Boolean in <lambda>() 43 override fun getMessage(value: T): String { in getMessage()
|
D | Condition.kt | 47 open class Condition<T>( 49 protected open val condition: (T) -> Boolean 52 fun isSatisfied(value: T): Boolean { in isSatisfied() 57 fun negate(): Condition<T> = Condition(message = "!$message") { !this.condition.invoke(it) } in <lambda>() 60 open fun getMessage(value: T): String = "$message(passed=${isSatisfied(value)})"
|
/platform_testing/libraries/flicker/utils/test/src/android/tools/utils/ |
D | KotlinMockito.kt | 24 inline fun <T> any(type: Class<T>): T { in <lambda>() 29 inline fun <reified T : Any> argThat(noinline predicate: T.() -> Boolean): T { in <lambda>() 30 return ArgumentMatchers.argThat { arg: T? -> arg?.predicate() ?: false } in <lambda>() 34 inline fun <T> uninitialized(): T = null as T in <lambda>()
|
/platform_testing/libraries/motion/src/platform/test/motion/testing/ |
D | DataPointSubject.kt | 29 class DataPointSubject<T> in <lambda>() 30 private constructor(failureMetadata: FailureMetadata, private val actual: DataPoint<T>?) : in <lambda>() 34 check("isUnknown").that(actual).isEqualTo(DataPoint.unknownType<T>()) in <lambda>() 38 check("isNotFound").that(actual).isEqualTo(DataPoint.notFound<T>()) in <lambda>() 41 fun hasNativeValue(nativeValue: T) { in <lambda>() 45 val valueDataPoint = actual as ValueDataPoint<T> in <lambda>() 61 fun <T> dataPoint(): Factory<DataPointSubject<T>, DataPoint<T>> { in <lambda>() 62 return Factory { failureMetadata: FailureMetadata, subject: DataPoint<T>? -> in <lambda>() 68 fun <T> assertThat(dataPoint: DataPoint<T>): DataPointSubject<T> = in <lambda>() 69 Truth.assertAbout(dataPoint<T>()).that(dataPoint) in <lambda>()
|
D | DataPointTypeSubject.kt | 30 class DataPointTypeSubject<T> in <lambda>() 31 private constructor(failureMetadata: FailureMetadata, private val actual: DataPointType<T>?) : in <lambda>() 40 fun convertsJsonObject(nativeObject: T, jsonRepresentation: String) { in <lambda>() 50 fun convertsJsonArray(nativeObject: T, jsonRepresentation: String) { in <lambda>() 55 nativeObject: T, in <lambda>() 77 .isEqualTo(DataPoint.unknownType<T>()) in <lambda>() 83 fun <T> dataPointType(): Factory<DataPointTypeSubject<T>, DataPointType<T>> { in <lambda>() 84 return Factory { failureMetadata: FailureMetadata, subject: DataPointType<T>? -> in <lambda>() 90 fun <T> assertThat(dataPointType: DataPointType<T>): DataPointTypeSubject<T> = in <lambda>() 91 Truth.assertAbout(dataPointType<T>()).that(dataPointType) in <lambda>()
|
/platform_testing/libraries/motion/compose/src/platform/test/motion/compose/ |
D | MotionTestValues.kt | 28 fun <T> hasMotionTestValue(motionTestValueKey: MotionTestValueKey<T>): SemanticsMatcher = in hasMotionTestValue() 37 fun <T> SemanticsNodeInteractionsProvider.motionTestValueOfNode( in hasMotionTestValue() 38 motionTestValueKey: MotionTestValueKey<T>, in hasMotionTestValue() 41 ): T = onNode(matcher, useUnmergedTree).fetchSemanticsNode().get(motionTestValueKey) in hasMotionTestValue() 50 fun <T : Any> TimeSeriesCaptureScope<SemanticsNodeInteractionsProvider>.feature( in hasMotionTestValue() 51 motionTestValueKey: MotionTestValueKey<T>, in hasMotionTestValue() 52 dataPointType: DataPointType<T>, in hasMotionTestValue() 69 fun <T> TimeSeriesCaptureScope<SemanticsNodeInteractionsProvider>.feature( in feature() 70 motionTestValueKey: MotionTestValueKey<T>, in feature() 71 capture: FeatureCapture<T, *>, in feature() [all …]
|
/platform_testing/libraries/flicker/utils/src/android/tools/ |
D | Extensions.kt | 21 inline fun <reified T : Any> withCache(newInstancePredicate: () -> T): T = in withCache() 24 inline fun <T> withTracing(name: String, predicate: () -> T): T = in withCache()
|
D | CacheImpl.kt | 22 override fun <T : Any> get(element: T): T { in get() 23 return cache.getOrPut(element) { element } as T in get()
|
/platform_testing/libraries/health/utils/src/android/platform/test/util/ |
D | HealthTestingUtils.java | 62 public static <T> T waitForValuePresent( in waitForValuePresent() 63 Supplier<String> message, Supplier<Optional<T>> resultProducer) { in waitForValuePresent() 65 public T value; in waitForValuePresent() 72 final Optional<T> optionalResult = resultProducer.get(); in waitForValuePresent() 94 public static <T> T waitForValueCatchingStaleObjectExceptions( in waitForValueCatchingStaleObjectExceptions() 95 Supplier<String> errorMessage, Supplier<T> resultProducer) { in waitForValueCatchingStaleObjectExceptions() 141 public static <T> T waitForValueToSettle(Supplier<String> errorMessage, Supplier<T> supplier) { 156 public static <T> T waitForValueToSettle( 158 Supplier<T> supplier,
|
/platform_testing/libraries/uiautomator-helpers/src/android/platform/uiautomator_helpers/ |
D | WaitUtils.kt | 149 fun <T> waitForValueToSettle( in waitForValueToSettle() 155 supplier: () -> T, in waitForValueToSettle() 156 ): T { in waitForValueToSettle() 189 fun <T> waitForNullableValueToSettle( in waitForNullableValueToSettle() 195 supplier: () -> T?, in waitForNullableValueToSettle() 196 ): T? { in waitForNullableValueToSettle() 213 var previousValue: T? = null in waitForNullableValueToSettle() 267 fun <T> waitForNullable( in waitForNullable() 270 checker: (T?) -> Boolean = { it != null }, in waitForNullable() 271 supplier: () -> T?, [all …]
|
/platform_testing/libraries/app-helpers/core/src/android/platform/helpers/ |
D | HelperAccessor.java | 29 public class HelperAccessor<T extends IAppHelper> { 30 private final Class<T> mInterfaceClass; 32 private T mHelper; 35 public HelperAccessor(Class<T> klass) { in HelperAccessor() 40 public HelperAccessor<T> withPrefix(String prefix) { in withPrefix() 48 public T get() { in get()
|
D | HelperManager.java | 149 public <T extends ITestHelper> T get(Class<T> base) { in get() 161 public <T extends ITestHelper> T get(Class<T> base, String keyword) { in get() 162 List<T> matching = getAll(base, keyword); in get() 177 public <T extends ITestHelper> T get(Class<T> base, Pattern regex) { in get() 178 List<T> matching = getAll(base, regex); in get() 193 private <T extends ITestHelper> List<T> getAll(Class<T> base, String keyword) { in getAll() 206 private <T extends ITestHelper> List<T> getAll(Class<T> base, Pattern regex) { in getAll() 207 List<T> implementations = new ArrayList<>(); in getAll() 229 implementations.add((T)constructor.newInstance(mInstrumentation)); in getAll()
|
/platform_testing/libraries/motion/src/platform/test/motion/view/ |
D | ViewToolkit.kt | 54 data class ViewRecordingSpec<T>( in <lambda>() 55 val captureRoot: T, in <lambda>() 58 val timeSeriesCapture: TimeSeriesCaptureScope<T>.() -> Unit, in <lambda>() 69 fun <T> T.capture( in <lambda>() 72 timeSeriesCapture: TimeSeriesCaptureScope<T>.() -> Unit, in <lambda>() 87 fun <T : View> T.capture( in <lambda>() 89 timeSeriesCapture: TimeSeriesCaptureScope<T>.() -> Unit in <lambda>() 103 fun <T> T.captureWithoutScreenshot( in <lambda>() 105 timeSeriesCapture: TimeSeriesCaptureScope<T>.() -> Unit in <lambda>() 118 fun <T> MotionTestRule<ViewToolkit>.record( in record() [all …]
|
/platform_testing/libraries/health/rules/src/android/platform/test/rule/ |
D | SettingRule.kt | 11 abstract class SettingRule<T>( 12 private val initialValue: T? = null, 32 inline fun <reified T> getSettingValue(): T? { in getSettingValue() 35 when (T::class) { in getSettingValue() 43 return actualValue as T in getSettingValue() 46 fun setSettingValue(value: T?) { in setSettingValue()
|
D | AnnotationUtils.kt | 4 fun <T> Class<T>?.hasAnnotation(annotation: Class<out Annotation>): Boolean = in hasAnnotation() 12 fun <T, V : Annotation> getLowestAncestorClassAnnotation( in hasAnnotation() 13 testClass: Class<T>?, in hasAnnotation()
|
/platform_testing/libraries/flicker/src/android/tools/flicker/subject/ |
D | CheckSubject.kt | 26 data class CheckSubject<T>( 27 private val actualValue: T?, 43 fun isEqual(expectedValue: T?) { in isEqual() 54 fun isNotEqual(expectedValue: T?) { in isNotEqual() 87 fun isLower(expectedValue: T?) { in isLower() 91 (actualValue as Comparable<T>) >= expectedValue in isLower() 102 fun isLowerOrEqual(expectedValue: T?) { in isLowerOrEqual() 106 (actualValue as Comparable<T>) > expectedValue in isLowerOrEqual() 117 fun isGreater(expectedValue: T) { in isGreater() 121 (actualValue as Comparable<T>) <= expectedValue in isGreater() [all …]
|
/platform_testing/libraries/flicker/utils/test/src/android/tools/datatypes/ |
D | DatatypeTest.kt | 22 abstract class DatatypeTest<T : DataType> { 23 protected abstract val valueEmpty: T 24 protected abstract val valueTest: T 25 protected abstract val valueEqual: T 26 protected abstract val valueDifferent: T
|
/platform_testing/libraries/motion/compose/values/src/platform/test/motion/compose/values/ |
D | MotionTestValue.kt | 35 class MotionTestValueKey<T>(name: String) { 36 val semanticsPropertyKey = SemanticsPropertyKey<T>(name) 51 infix fun <T> T.exportAs(key: MotionTestValueKey<T>) in exportAs() 86 override fun <T> T.exportAs(key: MotionTestValueKey<T>) { in applySemantics()
|
/platform_testing/libraries/health/options/src/android/platform/test/option/ |
D | TestOption.java | 44 public abstract class TestOption<T> implements TestRule { 46 private T mDefaultValue; 48 private T mValue; 98 public <S extends TestOption<T>> S setRequired(boolean required) { 104 public <S extends TestOption<T>> S setDefault(T defaultValue) { 117 public T get() { 134 protected abstract T parseValueFromString(String value);
|
/platform_testing/libraries/health/composers/host/src/android/host/test/composer/ |
D | ShuffleBase.java | 25 public abstract class ShuffleBase<T, U> implements Compose<T, U> { 41 public List<U> apply(T args, List<U> input) { in apply() 51 protected abstract boolean getShuffleArgument(T args); in getShuffleArgument() 54 protected abstract long getSeedArgument(T args); in getSeedArgument()
|
/platform_testing/libraries/flicker/utils/src/android/tools/traces/parsers/perfetto/ |
D | TraceProcessorSession.kt | 35 fun <T> query(sql: String, predicate: (List<Row>) -> T): T { in query() 43 fun <T> loadPerfettoTrace(trace: ByteArray, predicate: (TraceProcessorSession) -> T): T { in loadPerfettoTrace()
|