Merge "Add a rule about platform_apis"
am: 8a64f8c907
Change-Id: Ifdd8bd693fee625f63db403ce7a4dbc9209eb398
This commit is contained in:
@@ -222,6 +222,29 @@ func run(t *testing.T, ctx *android.TestContext, config android.Config) {
|
||||
android.FailIfErrored(t, errs)
|
||||
}
|
||||
|
||||
func testJavaError(t *testing.T, pattern string, bp string) {
|
||||
t.Helper()
|
||||
config := testConfig(nil)
|
||||
ctx := testContext(bp, nil)
|
||||
|
||||
pathCtx := android.PathContextForTesting(config, nil)
|
||||
setDexpreoptTestGlobalConfig(config, dexpreopt.GlobalConfigForTests(pathCtx))
|
||||
|
||||
ctx.Register()
|
||||
_, errs := ctx.ParseBlueprintsFiles("Android.bp")
|
||||
if len(errs) > 0 {
|
||||
android.FailIfNoMatchingErrors(t, pattern, errs)
|
||||
return
|
||||
}
|
||||
_, errs = ctx.PrepareBuildActions(config)
|
||||
if len(errs) > 0 {
|
||||
android.FailIfNoMatchingErrors(t, pattern, errs)
|
||||
return
|
||||
}
|
||||
|
||||
t.Fatalf("missing expected error %q (0 errors are returned)", pattern)
|
||||
}
|
||||
|
||||
func testJava(t *testing.T, bp string) (*android.TestContext, android.Config) {
|
||||
t.Helper()
|
||||
config := testConfig(nil)
|
||||
|
Reference in New Issue
Block a user