From 6bac49c560e9aecd7c90550bc38c0270351aa33b Mon Sep 17 00:00:00 2001 From: Paul Duffin Date: Fri, 12 Mar 2021 21:28:15 +0000 Subject: Convert testJavaError to test fixtures Bug: 182638834 Test: m nothing Change-Id: If6de91cd60fea36c945f2b0d51a04e26c838e4af --- java/java_test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'java/java_test.go') 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. -- cgit v1.2.3-59-g8ed1b