diff options
Diffstat (limited to 'android/testing.go')
-rw-r--r-- | android/testing.go | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/android/testing.go b/android/testing.go index 7b4411e2f..c692c7295 100644 --- a/android/testing.go +++ b/android/testing.go @@ -1287,3 +1287,21 @@ func EnsureListContainsSuffix(t *testing.T, result []string, expected string) { t.Errorf("%q is not found in %v", expected, result) } } + +type panickingConfigAndErrorContext struct { + ctx *TestContext +} + +func (ctx *panickingConfigAndErrorContext) OtherModulePropertyErrorf(module Module, property, fmt string, args ...interface{}) { + panic(ctx.ctx.PropertyErrorf(module, property, fmt, args...).Error()) +} + +func (ctx *panickingConfigAndErrorContext) Config() Config { + return ctx.ctx.Config() +} + +func PanickingConfigAndErrorContext(ctx *TestContext) ConfigAndErrorContext { + return &panickingConfigAndErrorContext{ + ctx: ctx, + } +} |