Fixed TestWithLooperRule switch for UiThreadStatement and ExpectException
When switching from AndroidTestRunner to AndroidJUnit4, the annotation @Test(expected = <Exception> wrap the test method, which is delegated out to AndroidTestRunner if it's there, but a switch statement in wrapMethodInStatement is called in the AndroidJUnit4 case, which caused an exception for the uhandled case.
Bug: 352170965
Test: manual test with atest
Flag: TEST_ONLY
Change-Id: Ib45be25234519a22031b5774e9c83fcad59c1c47
diff --git a/tests/testables/Android.bp b/tests/testables/Android.bp
index 7596ee7..f211185 100644
--- a/tests/testables/Android.bp
+++ b/tests/testables/Android.bp
@@ -25,7 +25,10 @@
java_library {
name: "testables",
- srcs: ["src/**/*.java"],
+ srcs: [
+ "src/**/*.java",
+ "src/**/*.kt",
+ ],
libs: [
"android.test.runner.stubs.system",
"android.test.mock.stubs.system",