summaryrefslogtreecommitdiff
path: root/java/java_test.go
diff options
context:
space:
mode:
authorPaul Duffin <paulduffin@google.com>2021-03-12 21:28:15 +0000
committerPaul Duffin <paulduffin@google.com>2021-03-14 01:08:26 +0000
commit6bac49c560e9aecd7c90550bc38c0270351aa33b (patch)
treee659d89f541539ce1eb52c7c79bd95698d8d82c8 /java/java_test.go
parent0ed42d3c9d208a6f06c3351fae3ffcf1e52ab4be (diff)
Convert testJavaError to test fixtures
Bug: 182638834 Test: m nothing Change-Id: If6de91cd60fea36c945f2b0d51a04e26c838e4af
Diffstat (limited to 'java/java_test.go')
-rw-r--r--java/java_test.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/java/java_test.go b/java/java_test.go
index 670eefc76..2ef3f426f 100644
--- a/java/java_test.go
+++ b/java/java_test.go
@@ -147,7 +147,11 @@ func run(t *testing.T, ctx *android.TestContext, config android.Config) {
// deprecated
func testJavaError(t *testing.T, pattern string, bp string) (*android.TestContext, android.Config) {
t.Helper()
- return testJavaErrorWithConfig(t, pattern, testConfig(nil, bp, nil))
+ result := javaFixtureFactory.
+ Extend(dexpreopt.PrepareForTestWithDexpreopt).
+ ExtendWithErrorHandler(android.FixtureExpectsAtLeastOneErrorMatchingPattern(pattern)).
+ RunTestWithBp(t, bp)
+ return result.TestContext, result.Config
}
// testJavaErrorWithConfig is a legacy way of running tests of java modules that expect errors.