Loading packages/SettingsLib/SpaPrivileged/Android.bp +0 −3 Original line number Diff line number Diff line Loading @@ -41,9 +41,6 @@ java_defaults { "SpaPrivilegedLib", ], kotlincflags: ["-Xjvm-default=all"], javacflags: [ "-J-Xmx4G", ], } // Expose the srcs to tests, so the tests can access the internal classes. Loading packages/SettingsLib/SpaPrivileged/tests/Android.bp +1 −3 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ android_test { certificate: "platform", platform_apis: true, test_suites: ["device-tests"], defaults: ["SpaPrivilegedLib-defaults"], srcs: [ ":SpaPrivilegedLib_srcs", Loading @@ -30,8 +31,6 @@ android_test { ], static_libs: [ "SpaPrivilegedLib", "androidx.compose.runtime_runtime", "androidx.compose.ui_ui-test-junit4", "androidx.compose.ui_ui-test-manifest", "androidx.test.ext.junit", Loading @@ -40,7 +39,6 @@ android_test { "truth-prebuilt", ], kotlincflags: [ "-Xjvm-default=all", "-opt-in=kotlin.RequiresOptIn", ], } packages/SettingsLib/SpaPrivileged/tests/src/com/android/settingslib/spaprivileged/model/app/AppListRepositoryTest.kt +5 −3 Original line number Diff line number Diff line Loading @@ -23,10 +23,11 @@ import android.content.pm.PackageManager.ApplicationInfoFlags import android.content.pm.PackageManager.ResolveInfoFlags import androidx.test.ext.junit.runners.AndroidJUnit4 import com.google.common.truth.Truth.assertThat import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.flow.flowOf import kotlinx.coroutines.flow.toList import kotlinx.coroutines.launch import kotlinx.coroutines.runBlocking import kotlinx.coroutines.test.runTest import org.junit.Before import org.junit.Rule import org.junit.Test Loading @@ -41,6 +42,7 @@ import org.mockito.junit.MockitoRule private const val USER_ID = 0 @OptIn(ExperimentalCoroutinesApi::class) @RunWith(AndroidJUnit4::class) class AppListRepositoryTest { Loading Loading @@ -82,7 +84,7 @@ class AppListRepositoryTest { } @Test fun notShowInstantApps(): Unit = runBlocking { fun notShowInstantApps() = runTest { val appListConfig = AppListConfig(userId = USER_ID, showInstantApps = false) val appListFlow = repository.loadApps(flowOf(appListConfig)) Loading @@ -97,7 +99,7 @@ class AppListRepositoryTest { } @Test fun showInstantApps(): Unit = runBlocking { fun showInstantApps() = runTest { val appListConfig = AppListConfig(userId = USER_ID, showInstantApps = true) val appListFlow = repository.loadApps(flowOf(appListConfig)) Loading Loading
packages/SettingsLib/SpaPrivileged/Android.bp +0 −3 Original line number Diff line number Diff line Loading @@ -41,9 +41,6 @@ java_defaults { "SpaPrivilegedLib", ], kotlincflags: ["-Xjvm-default=all"], javacflags: [ "-J-Xmx4G", ], } // Expose the srcs to tests, so the tests can access the internal classes. Loading
packages/SettingsLib/SpaPrivileged/tests/Android.bp +1 −3 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ android_test { certificate: "platform", platform_apis: true, test_suites: ["device-tests"], defaults: ["SpaPrivilegedLib-defaults"], srcs: [ ":SpaPrivilegedLib_srcs", Loading @@ -30,8 +31,6 @@ android_test { ], static_libs: [ "SpaPrivilegedLib", "androidx.compose.runtime_runtime", "androidx.compose.ui_ui-test-junit4", "androidx.compose.ui_ui-test-manifest", "androidx.test.ext.junit", Loading @@ -40,7 +39,6 @@ android_test { "truth-prebuilt", ], kotlincflags: [ "-Xjvm-default=all", "-opt-in=kotlin.RequiresOptIn", ], }
packages/SettingsLib/SpaPrivileged/tests/src/com/android/settingslib/spaprivileged/model/app/AppListRepositoryTest.kt +5 −3 Original line number Diff line number Diff line Loading @@ -23,10 +23,11 @@ import android.content.pm.PackageManager.ApplicationInfoFlags import android.content.pm.PackageManager.ResolveInfoFlags import androidx.test.ext.junit.runners.AndroidJUnit4 import com.google.common.truth.Truth.assertThat import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.flow.flowOf import kotlinx.coroutines.flow.toList import kotlinx.coroutines.launch import kotlinx.coroutines.runBlocking import kotlinx.coroutines.test.runTest import org.junit.Before import org.junit.Rule import org.junit.Test Loading @@ -41,6 +42,7 @@ import org.mockito.junit.MockitoRule private const val USER_ID = 0 @OptIn(ExperimentalCoroutinesApi::class) @RunWith(AndroidJUnit4::class) class AppListRepositoryTest { Loading Loading @@ -82,7 +84,7 @@ class AppListRepositoryTest { } @Test fun notShowInstantApps(): Unit = runBlocking { fun notShowInstantApps() = runTest { val appListConfig = AppListConfig(userId = USER_ID, showInstantApps = false) val appListFlow = repository.loadApps(flowOf(appListConfig)) Loading @@ -97,7 +99,7 @@ class AppListRepositoryTest { } @Test fun showInstantApps(): Unit = runBlocking { fun showInstantApps() = runTest { val appListConfig = AppListConfig(userId = USER_ID, showInstantApps = true) val appListFlow = repository.loadApps(flowOf(appListConfig)) Loading