diff options
author | 2020-05-08 19:18:40 +0000 | |
---|---|---|
committer | 2020-05-08 19:18:40 +0000 | |
commit | a71fe150fa4d9535549a7d9cb63db91c7332eb8a (patch) | |
tree | 02f7ecec8c181a5788aa947d5231b7be86aa2b3c /sdk/sdk_test.go | |
parent | 50fc599bbc01cf623efa2bed9f98e9e0f2e30fe6 (diff) | |
parent | e509447c9348f5dbfc29393665d74caab9ad22c6 (diff) |
Merge changes from topic "revert-1302576-NGVCIVIIJO"
* changes:
Revert "Detect invalid arch specific properties in snapshot"
Revert "Adds support for 'ignored-on-host'"
Revert "Fix snapshot of a host/device cc_library with stubs"
Diffstat (limited to 'sdk/sdk_test.go')
-rw-r--r-- | sdk/sdk_test.go | 38 |
1 files changed, 6 insertions, 32 deletions
diff --git a/sdk/sdk_test.go b/sdk/sdk_test.go index ae1a4923a..095f83607 100644 --- a/sdk/sdk_test.go +++ b/sdk/sdk_test.go @@ -226,8 +226,8 @@ func TestSDkInstall(t *testing.T) { } type EmbeddedPropertiesStruct struct { - S_Embedded_Common string `android:"arch_variant"` - S_Embedded_Different string `android:"arch_variant"` + S_Embedded_Common string + S_Embedded_Different string } type testPropertiesStruct struct { @@ -235,11 +235,11 @@ type testPropertiesStruct struct { private string Public_Kept string `sdk:"keep"` S_Common string - S_Different string `android:"arch_variant"` + S_Different string A_Common []string - A_Different []string `android:"arch_variant"` + A_Different []string F_Common *bool - F_Different *bool `android:"arch_variant"` + F_Different *bool EmbeddedPropertiesStruct } @@ -289,12 +289,9 @@ func TestCommonValueOptimization(t *testing.T) { } extractor := newCommonValueExtractor(common) + extractor.extractCommonProperties(common, structs) h := TestHelper{t} - - err := extractor.extractCommonProperties(common, structs) - h.AssertDeepEquals("unexpected error", nil, err) - h.AssertDeepEquals("common properties not correct", &testPropertiesStruct{ name: "common", @@ -349,26 +346,3 @@ func TestCommonValueOptimization(t *testing.T) { }, structs[1]) } - -func TestCommonValueOptimization_InvalidArchSpecificVariants(t *testing.T) { - common := &testPropertiesStruct{name: "common"} - structs := []propertiesContainer{ - &testPropertiesStruct{ - name: "struct-0", - S_Common: "should-be-but-is-not-common0", - }, - &testPropertiesStruct{ - name: "struct-1", - S_Common: "should-be-but-is-not-common1", - }, - } - - extractor := newCommonValueExtractor(common) - - h := TestHelper{t} - - err := extractor.extractCommonProperties(common, structs) - h.AssertErrorMessageEquals("unexpected error", `field "S_Common" is not tagged as "arch_variant" but has arch specific properties: - "struct-0" has value "should-be-but-is-not-common0" - "struct-1" has value "should-be-but-is-not-common1"`, err) -} |