Home
last modified time | relevance | path

Searched refs:isMainThread (Results 1 – 6 of 6) sorted by relevance

/external/robolectric-shadows/robolectric/src/test/java/org/robolectric/
DRuntimeEnvironmentTest.java36 res.set(RuntimeEnvironment.isMainThread()); in isMainThread_forNewThread_withoutSwitch()
45 assertThat(RuntimeEnvironment.isMainThread()).named("testThread").isTrue(); in isMainThread_forNewThread_withoutSwitch()
56 res.set(RuntimeEnvironment.isMainThread()); in isMainThread_forNewThread_withSwitch()
65 assertThat(RuntimeEnvironment.isMainThread()).named("testThread").isFalse(); in isMainThread_forNewThread_withSwitch()
73 assertThat(RuntimeEnvironment.isMainThread(t)).isTrue(); in isMainThread_withArg_forNewThread_withSwitch()
DRobolectricTestRunnerSelfTest.java71 assertThat(RuntimeEnvironment.isMainThread()).isTrue(); in testMethod_shouldBeInvoked_onMainThread()
76 assertThat(RuntimeEnvironment.isMainThread()).isTrue(); in whenTestHarnessUsesDifferentThread_shouldStillReportAsMainThread()
108 onTerminateCalledFromMain = Boolean.valueOf(RuntimeEnvironment.isMainThread()); in onTerminate()
/external/robolectric-shadows/shadows/framework/src/main/java/org/robolectric/shadows/
DShadowLooper.java4 import static org.robolectric.RuntimeEnvironment.isMainThread;
52 if (!isMainThread()) { in resetThreadLoopers()
79 if (isMainThread()) { in __constructor__()
148 return isMainThread(thread) ? mainLooper : loopingLoopers.get(thread); in getLooperForThread()
/external/robolectric-shadows/shadows/framework/src/main/java/org/robolectric/
DRuntimeEnvironment.java46 public static boolean isMainThread(Thread thread) { in isMainThread() method in RuntimeEnvironment
55 public static boolean isMainThread() { in isMainThread() method in RuntimeEnvironment
56 return isMainThread(Thread.currentThread()); in isMainThread()
/external/robolectric-shadows/robolectric/src/test/java/org/robolectric/android/internal/
DParallelUniverseTest.java90 assertThat(RuntimeEnvironment.isMainThread()).isFalse(); in setUpApplicationState_setsMainThread()
92 assertThat(RuntimeEnvironment.isMainThread()).isTrue(); in setUpApplicationState_setsMainThread()
101 res.set(RuntimeEnvironment.isMainThread()); in setUpApplicationState_setsMainThread_onAnotherThread()
106 assertThat(RuntimeEnvironment.isMainThread()).isFalse(); in setUpApplicationState_setsMainThread_onAnotherThread()
/external/tensorflow/tensorflow/lite/experimental/swift/TestApps/TensorFlowLiteApp/TensorFlowLiteApp/
DViewController.swift297 if Thread.isMainThread { block(); return }