Home
last modified time | relevance | path

Searched refs:T (Results 1 – 25 of 121) sorted by relevance

12345

/cts/tests/camera/utils/src/android/hardware/camera2/cts/helpers/
DCameraErrorCollector.java85 public <T> void checkThat(final T value, final Matcher<T> matcher) { in checkThat()
96 public <T> void checkThat(final String reason, final T value, final Matcher<T> matcher) { in checkThat()
141 public <T> boolean expectEquals(String msg, T expected, T actual) { in expectEquals()
163 public <T> boolean expectNotEquals(String msg, T expected, T actual) { in expectNotEquals()
183 public <T> boolean expectEquals(String msg, T[] expected, T[] actual) { in expectEquals()
208 public <T> boolean expectNotEquals(String msg, T[] expected, T[] actual) { in expectNotEquals()
230 public <T extends Comparable<? super T>> boolean expectGreater(String msg, T expected, in expectGreater()
231 T actual) { in expectGreater()
244 public <T extends Comparable<? super T>> boolean expectGreaterOrEqual(String msg, T expected, in expectGreaterOrEqual()
245 T actual) { in expectGreaterOrEqual()
[all …]
DInMatcher.java30 public class InMatcher<T> extends BaseMatcher<T> {
32 protected Collection<T> mValues;
34 public InMatcher(Collection<T> values) { in InMatcher()
39 public InMatcher(T... values) { in InMatcher()
47 T obj = (T) o; in matches()
48 for (T elem : mValues) { in matches()
62 public static <T> Matcher<T> in(T... operand) { in in()
63 return new InMatcher<T>(operand); in in()
67 public static <T> Matcher<T> in(Collection<T> operand) { in in()
68 return new InMatcher<T>(operand); in in()
DPreconditions.java60 public static <T> T checkEquals(String argName, T arg, in checkEquals()
61 String expectedName, T expectedValue) { in checkEquals()
85 public static <T> T checkNotNull(String argName, T arg) { in checkNotNull()
105 public static <T> T checkNotNull(T arg) { in checkNotNull()
138 public static <T> Collection<T> checkCollectionElementsNotNull(final Collection<T> value, in checkCollectionElementsNotNull()
145 for (T elem : value) { in checkCollectionElementsNotNull()
167 public static <T> Collection<T> checkCollectionNotEmpty(final Collection<T> value, in checkCollectionNotEmpty()
DAssertHelpers.java131 public static <T> void assertArrayContains(String message, T[] actual, T checkVals) { in assertArrayContains()
155 public static <T> T assertArrayContainsAnyOf(String message, T[] actual, T[] checkVals) { in assertArrayContainsAnyOf()
179 public static <T> T assertCollectionContainsAnyOf(String message, Collection<T> actual, in assertCollectionContainsAnyOf()
180 Collection<T> checkVals) { in assertCollectionContainsAnyOf()
182 T selected = null; in assertCollectionContainsAnyOf()
183 for (T check : checkVals) { in assertCollectionContainsAnyOf()
199 private static <T> List<T> buildList(T[] array) { in buildList()
200 return new ArrayList<T>(Arrays.asList(array)); in buildList()
211 private static <T> String formatCollection(Collection<T> collection, int maxLen) { in formatCollection()
216 for (T elem : collection) { in formatCollection()
DMaybeNull.java42 public static <T extends AutoCloseable> void close(T closeable) throws Exception { in close()
56 public static <T extends UncheckedCloseable> void close(T closeable) { in close()
68 public static <T extends Closeable> void close(T closeable) throws IOException { in close()
/cts/apps/CtsVerifier/include/colorchecker/
Dvec2.h23 template <class T>
26 Vec2(T inputX, T inputY) { in Vec2()
33 inline Vec2<T> operator+ (const Vec2<T> &param) const {
34 Vec2<T> temp(mX + param.x(), mY + param.y());
38 inline Vec2<T> operator- (const Vec2<T> &param) const {
39 Vec2<T> temp(mX - param.x(), mY - param.y());
59 inline T x() const { return mX; } in x()
60 inline T y() const { return mY; } in y()
62 inline void set(const T inputX, const T inputY) { in set()
68 T mX;
[all …]
Dvec3.h24 template <class T>
27 Vec3(T inputRed, T inputGreen, T inputBlue) { in Vec3()
36 inline Vec3<T> operator+ (const Vec3<U> &param) const {
37 Vec3<T> temp(mRed + param.r(), mGreen + param.g(), mBlue + param.b());
41 inline Vec3<T> operator- (const Vec3<T> &param) const {
42 Vec3<T> temp(mRed - param.r(), mGreen - param.g(), mBlue - param.b());
46 inline Vec3<T> operator* (const int param) const {
47 Vec3<T> temp(mRed * param, mGreen * param, mBlue * param);
98 inline T r() const { return mRed; } in r()
99 inline T g() const { return mGreen; } in g()
[all …]
/cts/tests/tests/rscpp/librscpptest/
Dvector.rs3 #define MAKE_TEST(T) \
4 void vector_test_##T(T t) {} \
5 void vector_test_##T##2(T##2 t) {} \
6 void vector_test_##T##3(T##3 t) {} \
7 void vector_test_##T##4(T##4 t) {} \
/cts/tests/tests/util/src/android/util/cts/
DRangeTest.java124 private static <T extends Comparable<? super T>> void verifyInRange(Range<T> object, T needle) { in verifyInRange()
128 private static <T extends Comparable<? super T>> void verifyOutOfRange(Range<T> object, in verifyOutOfRange()
129 T needle) { in verifyOutOfRange()
133 private static <T extends Comparable<? super T>> void verifyUpper(Range<T> object, T expected) { in verifyUpper()
137 private static <T extends Comparable<? super T>> void verifyLower(Range<T> object, T expected) { in verifyLower()
141 private static <T, T2> void verifyAction(String action, T object, T2 expected, in verifyAction()
147 private static <T, T2> void verifyAction(String action, T object, T2 needle, boolean expected, in verifyAction()
154 private static <T extends Comparable<? super T>> void verifyHashCodeEquals( in verifyHashCodeEquals()
155 Range<T> left, Range<T> right) { in verifyHashCodeEquals()
/cts/suite/audio_quality/lib/src/
DRWBuffer.h75 template <typename T> void write(T v) { in write()
77 assertWriteCapacity(sizeof(T)); in write()
78 memcpy(mBuffer + mWrPoint, src, sizeof(T)); in write()
79 mWrPoint += sizeof(T); in write()
87 template <typename T> T read() { in read()
88 T v; in read()
89 ASSERT((mRdPoint + sizeof(T)) <= mWrPoint); in read()
90 memcpy(&v, mBuffer + mRdPoint, sizeof(T)); in read()
91 mRdPoint += sizeof(T); in read()
/cts/tests/framework/base/activitymanager/util/src/android/server/am/settings/
DSettingsSession.java41 public class SettingsSession<T> implements AutoCloseable {
46 public interface SettingsGetter<T> {
47 T get(ContentResolver cr, String key) throws SettingNotFoundException; in get()
51 public interface SettingsSetter<T> {
52 void set(ContentResolver cr, String key, T value); in set()
62 private final SettingsGetter<T> mGetter;
63 private final SettingsSetter<T> mSetter;
65 private final T mInitialValue;
67 public SettingsSession(final Uri uri, final SettingsGetter<T> getter, in SettingsSession()
68 final SettingsSetter<T> setter) { in SettingsSession()
[all …]
/cts/hostsidetests/appsecurity/src/android/appsecurity/cts/
DBaseInstallMultiple.java43 public class BaseInstallMultiple<T extends BaseInstallMultiple<?>> {
59 T addArg(String arg) { in addArg()
61 return (T) this; in addArg()
64 T addApk(String apk) throws FileNotFoundException { in addApk()
67 return (T) this; in addApk()
70 T inheritFrom(String packageName) { in inheritFrom()
73 return (T) this; in inheritFrom()
76 T useNaturalAbi() { in useNaturalAbi()
78 return (T) this; in useNaturalAbi()
81 T locationAuto() { in locationAuto()
[all …]
/cts/tests/tests/renderscript/src/android/renderscript/cts/
DBaseObjTest.java29 Type T = TB.setX(1).create(); in testBaseObj() local
30 assertTrue(T != null); in testBaseObj()
31 BaseObj B = T; in testBaseObj()
38 T.destroy(); in testBaseObj()
40 T = TB.setX(2).create(); in testBaseObj()
41 assertTrue(T != null); in testBaseObj()
42 B = T; in testBaseObj()
/cts/tests/accessibilityservice/src/android/accessibilityservice/cts/utils/
DAsyncUtils.java35 public static <T> T await(Future<T> f) { in await()
39 public static <T> T await(Future<T> f, long time, TimeUnit timeUnit) { in await()
55 public static <T> CancellationException awaitCancellation(Future<T> f) { in awaitCancellation()
59 public static <T> CancellationException awaitCancellation( in awaitCancellation()
60 Future<T> f, long time, TimeUnit timeUnit) { in awaitCancellation()
DRunOnMainUtils.java31 public static <T extends Object> T getOnMain( in getOnMain()
32 Instrumentation instrumentation, Callable<T> callable) { in getOnMain()
33 AtomicReference<T> returnValue = new AtomicReference<>(null); in getOnMain()
/cts/tests/autofillservice/src/android/autofillservice/cts/common/
DStateChangerRule.java36 public class StateChangerRule<T> implements TestRule {
38 private final StateManager<T> mStateManager;
39 private final T mValue;
47 public StateChangerRule(@NonNull StateManager<T> stateManager, @Nullable T value) { in StateChangerRule()
58 final T previousValue = mStateManager.get(); in apply()
65 final T currentValue = mStateManager.get(); in apply()
DStateKeeperRule.java34 public class StateKeeperRule<T> implements TestRule {
36 private final StateManager<T> mStateManager;
43 public StateKeeperRule(@NonNull StateManager<T> stateManager) { in StateKeeperRule()
53 final T previousValue = mStateManager.get(); in apply()
57 final T currentValue = mStateManager.get(); in apply()
DStateManager.java23 public interface StateManager<T> {
28 void set(@Nullable T value); in set()
33 @Nullable T get(); in get()
/cts/tests/autofillservice/src/android/autofillservice/cts/
DAutofillActivityTestRule.java24 public class AutofillActivityTestRule<T extends Activity> extends ActivityTestRule<T> {
26 public AutofillActivityTestRule(Class<T> activityClass) { in AutofillActivityTestRule()
30 public AutofillActivityTestRule(Class<T> activityClass, boolean launchActivity) { in AutofillActivityTestRule()
DTimeout.java126 public <T> T run(String description, Callable<T> job) throws Exception { in run()
144 public <T> T run(String description, long retryMs, Callable<T> job) throws Exception { in run()
157 final T result = job.call(); in run()
/cts/tests/camera/src/android/hardware/camera2/cts/rs/
DScriptGraph.java350 public class ScriptBuilder<T extends Script<?>> {
352 private final Class<T> mScriptClass;
354 private ScriptBuilder(Class<T> scriptClass) { in ScriptBuilder()
358 private final ParameterMap<T> mParameterMap = new ParameterMap<T>();
373 public <K> ScriptBuilder<T> set(Script.ScriptParameter<T, K> parameter, K value) { in set() argument
383 ParameterMap<T> getParameterMap() { in getParameterMap()
387 Class<T> getScriptClass() { in getScriptClass()
416 public <T extends Script<?>> Builder chainScript(Class<T> scriptClass) { in chainScript()
419 return (new ScriptBuilder<T>(scriptClass)).buildScript(); in chainScript()
433 public <T extends Script<?>> ScriptBuilder<T> configureScript(Class<T> scriptClass) { in configureScript()
[all …]
DScript.java46 public abstract class Script<T extends android.renderscript.Script> implements UncheckedCloseable {
74 public <T> T get(Script.ScriptParameter<ScriptT, T> parameter) { in get()
77 return (T) mParameterMap.get(parameter); in get()
91 public <T> void set(Script.ScriptParameter<ScriptT, T> parameter, T value) { in set()
190 protected final T mScript;
259 protected Script(AllocationInfo inputInfo, AllocationInfo outputInfo, T rsScript) { in Script()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/audio/wavelib/
DDspBufferMath.java32 static private<T extends DspBufferBase> int estimateOperandsType(T a, T b) { in estimateOperandsType()
54 static public <T extends DspBufferBase> int add(T r, T a, T b) { in add()
58 T x = a; in add()
59 T y = b; in add()
126 static public <T extends DspBufferBase> int mult(T r, T a, T b) { in mult()
130 T x = a; in mult()
131 T y = b; in mult()
209 static public <T extends DspBufferBase> int mult(T r, T a, double v) { in mult()
213 T x = a; in mult()
255 static public <T extends DspBufferBase> int set(T r, T a) { in set()
[all …]
/cts/tests/tests/uirendering/src/android/uirendering/cts/util/
DSneakyThrow.java35 private static <T extends Throwable> void sneakyThrow_(Throwable t) throws T { in sneakyThrow_()
36 throw (T) t; in sneakyThrow_()
/cts/tests/tests/location/src/android/location/cts/asn1/base/
DAsn1SetOf.java27 public abstract class Asn1SetOf<T extends Asn1Object>
28 extends Asn1SequenceOf<T> {
37 new Comparator<T>() { in encodePerImpl()
39 public int compare(T lhsT, T rhsT) { in encodePerImpl()

12345