summaryrefslogtreecommitdiff
path: root/java/java_test.go
diff options
context:
space:
mode:
author Paul Duffin <paulduffin@google.com> 2021-03-15 17:13:55 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2021-03-15 17:13:55 +0000
commit56372081ed90a0e0ece552f4f3c9e0e6ab1b20c9 (patch)
treea5604a81bf5b2f35e372f04800b2214472213c6b /java/java_test.go
parent6f6f1eb83c15170b96c1ce3018ef0a03105ef3c4 (diff)
parent6bac49c560e9aecd7c90550bc38c0270351aa33b (diff)
Merge "Convert testJavaError to test fixtures"
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.