diff options
Diffstat (limited to 'sdk/bp_test.go')
-rw-r--r-- | sdk/bp_test.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sdk/bp_test.go b/sdk/bp_test.go index c620ac2b8..d3eaafeba 100644 --- a/sdk/bp_test.go +++ b/sdk/bp_test.go @@ -73,6 +73,7 @@ func checkPropertySetFixture(t *testing.T, val interface{}, hasTags bool) { } func TestAddPropertySimple(t *testing.T) { + t.Parallel() set := newPropertySet() for name, val := range map[string]interface{}{ "x": "taxi", @@ -91,14 +92,17 @@ func TestAddPropertySimple(t *testing.T) { } func TestAddPropertySubset(t *testing.T) { + t.Parallel() getFixtureMap := map[string]func() interface{}{ "property set": propertySetFixture, "property struct": propertyStructFixture, } t.Run("add new subset", func(t *testing.T) { + t.Parallel() for name, getFixture := range getFixtureMap { t.Run(name, func(t *testing.T) { + t.Parallel() set := propertySetFixture().(*bpPropertySet) set.AddProperty("new", getFixture()) checkPropertySetFixture(t, set, true) @@ -108,8 +112,10 @@ func TestAddPropertySubset(t *testing.T) { }) t.Run("merge existing subset", func(t *testing.T) { + t.Parallel() for name, getFixture := range getFixtureMap { t.Run(name, func(t *testing.T) { + t.Parallel() set := newPropertySet() subset := set.AddPropertySet("sub") subset.AddProperty("flag", false) @@ -123,12 +129,14 @@ func TestAddPropertySubset(t *testing.T) { }) t.Run("add conflicting subset", func(t *testing.T) { + t.Parallel() set := propertySetFixture().(*bpPropertySet) android.AssertPanicMessageContains(t, "adding x again should panic", `Property "x" already exists in property set`, func() { set.AddProperty("x", propertySetFixture()) }) }) t.Run("add non-pointer struct", func(t *testing.T) { + t.Parallel() set := propertySetFixture().(*bpPropertySet) str := propertyStructFixture().(*propertyStruct) android.AssertPanicMessageContains(t, "adding a non-pointer struct should panic", "Value is a struct, not a pointer to one:", @@ -137,6 +145,7 @@ func TestAddPropertySubset(t *testing.T) { } func TestAddPropertySetNew(t *testing.T) { + t.Parallel() set := newPropertySet() subset := set.AddPropertySet("sub") subset.AddProperty("new", "d^^b") @@ -144,6 +153,7 @@ func TestAddPropertySetNew(t *testing.T) { } func TestAddPropertySetExisting(t *testing.T) { + t.Parallel() set := propertySetFixture().(*bpPropertySet) subset := set.AddPropertySet("sub") subset.AddProperty("new", "d^^b") @@ -176,6 +186,7 @@ func (t removeFredTransformation) transformPropertySetAfterContents(name string, } func TestTransformRemoveProperty(t *testing.T) { + t.Parallel() set := newPropertySet() set.AddProperty("name", "name") set.AddProperty("fred", "12") @@ -188,6 +199,7 @@ func TestTransformRemoveProperty(t *testing.T) { } func TestTransformRemovePropertySet(t *testing.T) { + t.Parallel() set := newPropertySet() set.AddProperty("name", "name") set.AddPropertySet("fred") |