Handle property structs and BpPropertySets as values to AddProperty.
Both will create a nested property set, that may be merged with an
existing one.
Test: m nothing
Bug: 151303681
Change-Id: I30696ba3eb8960ca6fa54c9ee2cf6229ab9f5da9
diff --git a/sdk/testing.go b/sdk/testing.go
index b53558d..68058ee 100644
--- a/sdk/testing.go
+++ b/sdk/testing.go
@@ -217,6 +217,22 @@
}
}
+func (h *TestHelper) AssertPanic(message string, funcThatShouldPanic func()) {
+ h.t.Helper()
+ panicked := false
+ func() {
+ defer func() {
+ if x := recover(); x != nil {
+ panicked = true
+ }
+ }()
+ funcThatShouldPanic()
+ }()
+ if !panicked {
+ h.t.Error(message)
+ }
+}
+
// Encapsulates result of processing an SDK definition. Provides support for
// checking the state of the build structures.
type testSdkResult struct {