Loading ravenwood/tests/coretest/test/android/app/appsearch/AppSearchManager.java 0 → 100644 +29 −0 Original line number Diff line number Diff line /* * Copyright (C) 2025 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.app.appsearch; /** * Used by {@link com.android.ravenwoodtest.coretest.RavenwoodCoreBasicTest#testClassPath()}. * * This is to ensure that a ravenwood can contain a class to override a class with the * exact same qualified name in the mainline stub jar. */ public class AppSearchManager { /** Dummy method */ public static int foo() { return 42; } } ravenwood/tests/coretest/test/com/android/ravenwoodtest/coretest/RavenwoodCoreBasicTest.java +8 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,8 @@ package com.android.ravenwoodtest.coretest; import static org.junit.Assert.assertEquals; import android.app.appsearch.AppSearchManager; import org.junit.Test; import java.io.File; Loading Loading @@ -58,4 +60,10 @@ public class RavenwoodCoreBasicTest { assertEquals("value1", System.getProperty("xxx-extra-tradefed-option")); assertEquals("value2", System.getProperty("xxx-extra-runner-option")); } @Test public void testClassPath() throws Exception { // The mainline stub jar has this class too, but our own copy should be used at runtime. assertEquals(42, AppSearchManager.foo()); } } Loading
ravenwood/tests/coretest/test/android/app/appsearch/AppSearchManager.java 0 → 100644 +29 −0 Original line number Diff line number Diff line /* * Copyright (C) 2025 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.app.appsearch; /** * Used by {@link com.android.ravenwoodtest.coretest.RavenwoodCoreBasicTest#testClassPath()}. * * This is to ensure that a ravenwood can contain a class to override a class with the * exact same qualified name in the mainline stub jar. */ public class AppSearchManager { /** Dummy method */ public static int foo() { return 42; } }
ravenwood/tests/coretest/test/com/android/ravenwoodtest/coretest/RavenwoodCoreBasicTest.java +8 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,8 @@ package com.android.ravenwoodtest.coretest; import static org.junit.Assert.assertEquals; import android.app.appsearch.AppSearchManager; import org.junit.Test; import java.io.File; Loading Loading @@ -58,4 +60,10 @@ public class RavenwoodCoreBasicTest { assertEquals("value1", System.getProperty("xxx-extra-tradefed-option")); assertEquals("value2", System.getProperty("xxx-extra-runner-option")); } @Test public void testClassPath() throws Exception { // The mainline stub jar has this class too, but our own copy should be used at runtime. assertEquals(42, AppSearchManager.foo()); } }