Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 53323627 authored by Chaohui Wang's avatar Chaohui Wang Committed by Android (Google) Code Review
Browse files

Merge "Clean up @OptIn(ExperimentalCoroutinesApi::class)" into main

parents 65ce0257 246e96b7
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -18,7 +18,6 @@ package com.android.settingslib.spa.framework.compose

import androidx.test.ext.junit.runners.AndroidJUnit4
import com.google.common.truth.Truth.assertThat
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.flowOf
import kotlinx.coroutines.flow.toList
@@ -28,7 +27,6 @@ import kotlinx.coroutines.withTimeout
import org.junit.Test
import org.junit.runner.RunWith

@OptIn(ExperimentalCoroutinesApi::class)
@RunWith(AndroidJUnit4::class)
class OverridableFlowTest {

+0 −2
Original line number Diff line number Diff line
@@ -18,12 +18,10 @@ package com.android.settingslib.spa.framework.util

import androidx.test.ext.junit.runners.AndroidJUnit4
import com.google.common.truth.Truth
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.test.runTest
import org.junit.Test
import org.junit.runner.RunWith

@OptIn(ExperimentalCoroutinesApi::class)
@RunWith(AndroidJUnit4::class)
class CollectionsTest {
    @Test
+0 −2
Original line number Diff line number Diff line
@@ -18,7 +18,6 @@ package com.android.settingslib.spa.framework.util

import androidx.test.ext.junit.runners.AndroidJUnit4
import com.google.common.truth.Truth.assertThat
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.flow.count
import kotlinx.coroutines.flow.emptyFlow
import kotlinx.coroutines.flow.first
@@ -28,7 +27,6 @@ import kotlinx.coroutines.test.runTest
import org.junit.Test
import org.junit.runner.RunWith

@OptIn(ExperimentalCoroutinesApi::class)
@RunWith(AndroidJUnit4::class)
class FlowsTest {
    @Test
+0 −2
Original line number Diff line number Diff line
@@ -21,13 +21,11 @@ import androidx.test.ext.junit.runners.AndroidJUnit4
import com.android.settingslib.spa.framework.compose.stateOf
import com.android.settingslib.spa.testutils.firstWithTimeoutOrNull
import com.google.common.truth.Truth.assertThat
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.test.runTest
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith

@OptIn(ExperimentalCoroutinesApi::class)
@RunWith(AndroidJUnit4::class)
class StateFlowBridgeTest {
    @get:Rule
+12 −4
Original line number Diff line number Diff line
@@ -31,7 +31,6 @@ import androidx.test.ext.junit.runners.AndroidJUnit4
import com.android.internal.R
import com.android.settingslib.spaprivileged.framework.common.userManager
import com.google.common.truth.Truth.assertThat
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.flow.first
import kotlinx.coroutines.flow.flowOf
import kotlinx.coroutines.test.runTest
@@ -50,7 +49,6 @@ import org.mockito.junit.MockitoJUnit
import org.mockito.junit.MockitoRule
import org.mockito.Mockito.`when` as whenever

@OptIn(ExperimentalCoroutinesApi::class)
@RunWith(AndroidJUnit4::class)
class AppListRepositoryTest {
    @get:Rule
@@ -312,7 +310,12 @@ class AppListRepositoryTest {
    fun getSystemPackageNames_returnExpectedValues() = runTest {
        mockInstalledApplications(
            apps = listOf(
                NORMAL_APP, INSTANT_APP, SYSTEM_APP, UPDATED_SYSTEM_APP, HOME_APP, IN_LAUNCHER_APP
                NORMAL_APP,
                INSTANT_APP,
                SYSTEM_APP,
                UPDATED_SYSTEM_APP,
                HOME_APP,
                IN_LAUNCHER_APP,
            ),
            userId = ADMIN_USER_ID,
        )
@@ -329,7 +332,12 @@ class AppListRepositoryTest {
    fun loadAndFilterApps_loadNonSystemApp_returnExpectedValues() = runTest {
        mockInstalledApplications(
            apps = listOf(
                NORMAL_APP, INSTANT_APP, SYSTEM_APP, UPDATED_SYSTEM_APP, HOME_APP, IN_LAUNCHER_APP
                NORMAL_APP,
                INSTANT_APP,
                SYSTEM_APP,
                UPDATED_SYSTEM_APP,
                HOME_APP,
                IN_LAUNCHER_APP,
            ),
            userId = ADMIN_USER_ID,
        )
Loading