Searched refs:isMainThread (Results 1 – 8 of 8) sorted by relevance
37 res.set(RuntimeEnvironment.isMainThread()); in isMainThread_forNewThread_withoutSwitch()46 assertWithMessage("testThread").that(RuntimeEnvironment.isMainThread()).isTrue(); in isMainThread_forNewThread_withoutSwitch()57 res.set(RuntimeEnvironment.isMainThread()); in isMainThread_forNewThread_withSwitch()66 assertWithMessage("testThread").that(RuntimeEnvironment.isMainThread()).isFalse(); in isMainThread_forNewThread_withSwitch()74 assertThat(RuntimeEnvironment.isMainThread(t)).isTrue(); in isMainThread_withArg_forNewThread_withSwitch()
71 assertThat(RuntimeEnvironment.isMainThread()).isTrue(); in testMethod_shouldBeInvoked_onMainThread()76 assertThat(RuntimeEnvironment.isMainThread()).isTrue(); in whenTestHarnessUsesDifferentThread_shouldStillReportAsMainThread()108 onTerminateCalledFromMain = Boolean.valueOf(RuntimeEnvironment.isMainThread()); in onTerminate()
29 public static boolean isMainThread() { in isMainThread() method in ThreadUtil38 if (!isMainThread()) { in ensureMainThread()
4 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()
46 public static boolean isMainThread(Thread thread) { in isMainThread() method in RuntimeEnvironment55 public static boolean isMainThread() { in isMainThread() method in RuntimeEnvironment56 return isMainThread(Thread.currentThread()); in isMainThread()
90 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()
35 if(!NSThread.isMainThread)
33 if (NSThread.isMainThread) {