diff options
author | 2022-09-22 15:30:58 +0100 | |
---|---|---|
committer | 2022-09-26 18:23:25 +0100 | |
commit | 02e25c85eb32c337b3f8a2033c6c092b8fea91d3 (patch) | |
tree | 8c4c2e777fafa91cfd39c00113303e198cece44f /sdk/sdk_test.go | |
parent | 394a12b3150981364ccd1302c56e08c36c91520a (diff) |
Rename sdk field tag "keep" to "ignore"
"ignore" is a better description of the effect that this tag has on the
optimization that is done as part of the sdk snapshot generation.
"keep" implies that something special is done with the field during the
optimization process but actually the optimization process completely
ignores the property, just as it does with unexported fields.
Bug: 248258460
Test: m nothing
Change-Id: Idfdfd87f927d641d4d301cbbde72b463c89155bf
Diffstat (limited to 'sdk/sdk_test.go')
-rw-r--r-- | sdk/sdk_test.go | 108 |
1 files changed, 54 insertions, 54 deletions
diff --git a/sdk/sdk_test.go b/sdk/sdk_test.go index 8b8e1d701..4be1e79a4 100644 --- a/sdk/sdk_test.go +++ b/sdk/sdk_test.go @@ -218,15 +218,15 @@ type EmbeddedPropertiesStruct struct { } type testPropertiesStruct struct { - name string - private string - Public_Kept string `sdk:"keep"` - S_Common string - S_Different string `android:"arch_variant"` - A_Common []string - A_Different []string `android:"arch_variant"` - F_Common *bool - F_Different *bool `android:"arch_variant"` + name string + private string + Public_Ignore string `sdk:"ignore"` + S_Common string + S_Different string `android:"arch_variant"` + A_Common []string + A_Different []string `android:"arch_variant"` + F_Common *bool + F_Different *bool `android:"arch_variant"` EmbeddedPropertiesStruct } @@ -244,30 +244,30 @@ func TestCommonValueOptimization(t *testing.T) { common := &testPropertiesStruct{name: "common"} structs := []propertiesContainer{ &testPropertiesStruct{ - name: "struct-0", - private: "common", - Public_Kept: "common", - S_Common: "common", - S_Different: "upper", - A_Common: []string{"first", "second"}, - A_Different: []string{"alpha", "beta"}, - F_Common: proptools.BoolPtr(false), - F_Different: proptools.BoolPtr(false), + name: "struct-0", + private: "common", + Public_Ignore: "common", + S_Common: "common", + S_Different: "upper", + A_Common: []string{"first", "second"}, + A_Different: []string{"alpha", "beta"}, + F_Common: proptools.BoolPtr(false), + F_Different: proptools.BoolPtr(false), EmbeddedPropertiesStruct: EmbeddedPropertiesStruct{ S_Embedded_Common: "embedded_common", S_Embedded_Different: "embedded_upper", }, }, &testPropertiesStruct{ - name: "struct-1", - private: "common", - Public_Kept: "common", - S_Common: "common", - S_Different: "lower", - A_Common: []string{"first", "second"}, - A_Different: []string{"alpha", "delta"}, - F_Common: proptools.BoolPtr(false), - F_Different: proptools.BoolPtr(true), + name: "struct-1", + private: "common", + Public_Ignore: "common", + S_Common: "common", + S_Different: "lower", + A_Common: []string{"first", "second"}, + A_Different: []string{"alpha", "delta"}, + F_Common: proptools.BoolPtr(false), + F_Different: proptools.BoolPtr(true), EmbeddedPropertiesStruct: EmbeddedPropertiesStruct{ S_Embedded_Common: "embedded_common", S_Embedded_Different: "embedded_lower", @@ -282,15 +282,15 @@ func TestCommonValueOptimization(t *testing.T) { android.AssertDeepEquals(t, "common properties not correct", &testPropertiesStruct{ - name: "common", - private: "", - Public_Kept: "", - S_Common: "common", - S_Different: "", - A_Common: []string{"first", "second"}, - A_Different: []string(nil), - F_Common: proptools.BoolPtr(false), - F_Different: nil, + name: "common", + private: "", + Public_Ignore: "", + S_Common: "common", + S_Different: "", + A_Common: []string{"first", "second"}, + A_Different: []string(nil), + F_Common: proptools.BoolPtr(false), + F_Different: nil, EmbeddedPropertiesStruct: EmbeddedPropertiesStruct{ S_Embedded_Common: "embedded_common", S_Embedded_Different: "", @@ -300,15 +300,15 @@ func TestCommonValueOptimization(t *testing.T) { android.AssertDeepEquals(t, "updated properties[0] not correct", &testPropertiesStruct{ - name: "struct-0", - private: "common", - Public_Kept: "common", - S_Common: "", - S_Different: "upper", - A_Common: nil, - A_Different: []string{"alpha", "beta"}, - F_Common: nil, - F_Different: proptools.BoolPtr(false), + name: "struct-0", + private: "common", + Public_Ignore: "common", + S_Common: "", + S_Different: "upper", + A_Common: nil, + A_Different: []string{"alpha", "beta"}, + F_Common: nil, + F_Different: proptools.BoolPtr(false), EmbeddedPropertiesStruct: EmbeddedPropertiesStruct{ S_Embedded_Common: "", S_Embedded_Different: "embedded_upper", @@ -318,15 +318,15 @@ func TestCommonValueOptimization(t *testing.T) { android.AssertDeepEquals(t, "updated properties[1] not correct", &testPropertiesStruct{ - name: "struct-1", - private: "common", - Public_Kept: "common", - S_Common: "", - S_Different: "lower", - A_Common: nil, - A_Different: []string{"alpha", "delta"}, - F_Common: nil, - F_Different: proptools.BoolPtr(true), + name: "struct-1", + private: "common", + Public_Ignore: "common", + S_Common: "", + S_Different: "lower", + A_Common: nil, + A_Different: []string{"alpha", "delta"}, + F_Common: nil, + F_Different: proptools.BoolPtr(true), EmbeddedPropertiesStruct: EmbeddedPropertiesStruct{ S_Embedded_Common: "", S_Embedded_Different: "embedded_lower", |