diff options
author | 2024-01-30 10:36:03 -0800 | |
---|---|---|
committer | 2024-01-30 10:36:03 -0800 | |
commit | 7b647e4ea0e92f33c19b315eaed364ee067ba0aa (patch) | |
tree | 47c285aa18cf79476d615f8e169ebd823bee6d38 /test-mock | |
parent | 46deec9f696f850efdd4427e10db145d68cbb5bd (diff) | |
parent | efd99108901ae47b085f96c841214f6f416dd86f (diff) |
Merge Android 24Q1 Release (ab/11220357)
Bug: 319669529
Merged-In: I46c7859ff042ee7aa9193757e5df8269f4892362
Change-Id: I0c7b5036c0b0f5f2caad551edb063350f6eb87e7
Diffstat (limited to 'test-mock')
-rw-r--r-- | test-mock/Android.bp | 23 | ||||
-rw-r--r-- | test-mock/tests/src/android/test/mock/MockContextTest.java | 30 | ||||
-rw-r--r-- | test-mock/tests/src/android/test/mock/MockPackageManagerTest.java | 30 |
3 files changed, 83 insertions, 0 deletions
diff --git a/test-mock/Android.bp b/test-mock/Android.bp index 7c4d12e338a5..f37d2d17973e 100644 --- a/test-mock/Android.bp +++ b/test-mock/Android.bp @@ -54,6 +54,29 @@ java_sdk_library { dist_group: "android", } +java_library { + name: "android.test.mock.ravenwood", + srcs: [":android-test-mock-sources"], + visibility: [ + "//frameworks/base", + ], +} + +android_ravenwood_test { + name: "android.test.mock.ravenwood.tests", + libs: [ + "android.test.mock.ravenwood", + ], + static_libs: [ + "androidx.annotation_annotation", + "androidx.test.rules", + ], + srcs: [ + "tests/**/*.java", + ], + auto_gen_config: true, +} + // Make the current.txt available for use by the cts/tests/signature and /vendor tests. // ======================================================================== filegroup { diff --git a/test-mock/tests/src/android/test/mock/MockContextTest.java b/test-mock/tests/src/android/test/mock/MockContextTest.java new file mode 100644 index 000000000000..6e28267de46d --- /dev/null +++ b/test-mock/tests/src/android/test/mock/MockContextTest.java @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.test.mock; + +import androidx.test.runner.AndroidJUnit4; + +import org.junit.Test; +import org.junit.runner.RunWith; + +@RunWith(AndroidJUnit4.class) +public class MockContextTest { + @Test + public void testConstructor() { + new MockContext(); + } +} diff --git a/test-mock/tests/src/android/test/mock/MockPackageManagerTest.java b/test-mock/tests/src/android/test/mock/MockPackageManagerTest.java new file mode 100644 index 000000000000..5b860f169193 --- /dev/null +++ b/test-mock/tests/src/android/test/mock/MockPackageManagerTest.java @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.test.mock; + +import androidx.test.runner.AndroidJUnit4; + +import org.junit.Test; +import org.junit.runner.RunWith; + +@RunWith(AndroidJUnit4.class) +public class MockPackageManagerTest { + @Test + public void testConstructor() { + new MockPackageManager(); + } +} |