From 7b0cf4237fb917a681e59b20be71c9bd5cdd43ed Mon Sep 17 00:00:00 2001 From: Krzysztof KosiƄski Date: Fri, 27 Sep 2024 01:15:32 +0000 Subject: Update test for Truth8 deprecation. Truth8 is now included in Truth and importing both no longer works in version 1.4.0. Bug: 369506710 Test: presubmit, m IntentResolver-tests-unit Flag: EXEMPT test-only change Change-Id: Ia3bfcb92ed08b2889d637b9f508e2dea15602147 --- tests/activity/Android.bp | 1 - tests/integration/Android.bp | 1 - tests/unit/Android.bp | 1 - .../com/android/intentresolver/platform/NearbyShareModuleTest.kt | 8 ++++---- 4 files changed, 4 insertions(+), 7 deletions(-) (limited to 'tests') diff --git a/tests/activity/Android.bp b/tests/activity/Android.bp index 9d673b4c..2e66a84d 100644 --- a/tests/activity/Android.bp +++ b/tests/activity/Android.bp @@ -57,7 +57,6 @@ android_test { "mockito-kotlin-nodeps", "testables", "truth", - "truth-java8-extension", "flag-junit", "platform-test-annotations", ], diff --git a/tests/integration/Android.bp b/tests/integration/Android.bp index c968c128..9109507a 100644 --- a/tests/integration/Android.bp +++ b/tests/integration/Android.bp @@ -39,7 +39,6 @@ android_test { "IntentResolver-tests-shared", "junit", "truth", - "truth-java8-extension", ], test_suites: ["general-tests"], } diff --git a/tests/unit/Android.bp b/tests/unit/Android.bp index aec608f4..857d44aa 100644 --- a/tests/unit/Android.bp +++ b/tests/unit/Android.bp @@ -58,7 +58,6 @@ android_test { "platform-compat-test-rules", // PlatformCompatChangeRule "testables", // TestableContext/TestableResources "truth", - "truth-java8-extension", "flag-junit", "platform-test-annotations", ], diff --git a/tests/unit/src/com/android/intentresolver/platform/NearbyShareModuleTest.kt b/tests/unit/src/com/android/intentresolver/platform/NearbyShareModuleTest.kt index 6e5c97c2..a4bcad38 100644 --- a/tests/unit/src/com/android/intentresolver/platform/NearbyShareModuleTest.kt +++ b/tests/unit/src/com/android/intentresolver/platform/NearbyShareModuleTest.kt @@ -23,7 +23,7 @@ import android.provider.Settings import android.testing.TestableResources import androidx.test.platform.app.InstrumentationRegistry import com.android.intentresolver.R -import com.google.common.truth.Truth8.assertThat +import com.google.common.truth.Truth.assertThat import org.junit.Before import org.junit.Test @@ -34,7 +34,7 @@ class NearbyShareModuleTest { /** Create Resources with overridden values. */ private fun Context.fakeResources( config: Configuration? = null, - block: TestableResources.() -> Unit + block: TestableResources.() -> Unit, ) = TestableResources(resources) .apply { config?.let { overrideConfiguration(it) } } @@ -64,7 +64,7 @@ class NearbyShareModuleTest { context.fakeResources { addOverride( R.string.config_defaultNearbySharingComponent, - "com.example/.ComponentName" + "com.example/.ComponentName", ) } @@ -83,7 +83,7 @@ class NearbyShareModuleTest { context.fakeResources { addOverride( R.string.config_defaultNearbySharingComponent, - "com.example/.AComponent" + "com.example/.AComponent", ) } -- cgit v1.2.3-59-g8ed1b