Merge changes If673d482,I98b575b8 am: 38e2fbdc90
Change-Id: I0c0d1d5da191d6684f1fc40c57eeb224d8f2588e
This commit is contained in:
@@ -331,13 +331,7 @@ type SdkMemberType interface {
|
|||||||
|
|
||||||
// Add a prebuilt module that the sdk will populate.
|
// Add a prebuilt module that the sdk will populate.
|
||||||
//
|
//
|
||||||
// Returning nil from this will cause the sdk module type to use the deprecated BuildSnapshot
|
// The sdk module code generates the snapshot as follows:
|
||||||
// method to build the snapshot. That method is deprecated because it requires the SdkMemberType
|
|
||||||
// implementation to do all the word.
|
|
||||||
//
|
|
||||||
// Otherwise, returning a non-nil value from this will cause the sdk module type to do the
|
|
||||||
// majority of the work to generate the snapshot. The sdk module code generates the snapshot
|
|
||||||
// as follows:
|
|
||||||
//
|
//
|
||||||
// * A properties struct of type SdkMemberProperties is created for each variant and
|
// * A properties struct of type SdkMemberProperties is created for each variant and
|
||||||
// populated with information from the variant by calling PopulateFromVariant(SdkAware)
|
// populated with information from the variant by calling PopulateFromVariant(SdkAware)
|
||||||
|
@@ -283,7 +283,7 @@ func TestCommonValueOptimization(t *testing.T) {
|
|||||||
extractor.extractCommonProperties(common, structs)
|
extractor.extractCommonProperties(common, structs)
|
||||||
|
|
||||||
h := TestHelper{t}
|
h := TestHelper{t}
|
||||||
h.AssertDeepEquals("common properties not correct", common,
|
h.AssertDeepEquals("common properties not correct",
|
||||||
&testPropertiesStruct{
|
&testPropertiesStruct{
|
||||||
private: "",
|
private: "",
|
||||||
Public_Kept: "",
|
Public_Kept: "",
|
||||||
@@ -297,9 +297,10 @@ func TestCommonValueOptimization(t *testing.T) {
|
|||||||
S_Embedded_Common: "embedded_common",
|
S_Embedded_Common: "embedded_common",
|
||||||
S_Embedded_Different: "",
|
S_Embedded_Different: "",
|
||||||
},
|
},
|
||||||
})
|
},
|
||||||
|
common)
|
||||||
|
|
||||||
h.AssertDeepEquals("updated properties[0] not correct", structs[0],
|
h.AssertDeepEquals("updated properties[0] not correct",
|
||||||
&testPropertiesStruct{
|
&testPropertiesStruct{
|
||||||
private: "common",
|
private: "common",
|
||||||
Public_Kept: "common",
|
Public_Kept: "common",
|
||||||
@@ -313,9 +314,10 @@ func TestCommonValueOptimization(t *testing.T) {
|
|||||||
S_Embedded_Common: "",
|
S_Embedded_Common: "",
|
||||||
S_Embedded_Different: "embedded_upper",
|
S_Embedded_Different: "embedded_upper",
|
||||||
},
|
},
|
||||||
})
|
},
|
||||||
|
structs[0])
|
||||||
|
|
||||||
h.AssertDeepEquals("updated properties[1] not correct", structs[1],
|
h.AssertDeepEquals("updated properties[1] not correct",
|
||||||
&testPropertiesStruct{
|
&testPropertiesStruct{
|
||||||
private: "common",
|
private: "common",
|
||||||
Public_Kept: "common",
|
Public_Kept: "common",
|
||||||
@@ -329,5 +331,6 @@ func TestCommonValueOptimization(t *testing.T) {
|
|||||||
S_Embedded_Common: "",
|
S_Embedded_Common: "",
|
||||||
S_Embedded_Different: "embedded_lower",
|
S_Embedded_Different: "embedded_lower",
|
||||||
},
|
},
|
||||||
})
|
},
|
||||||
|
structs[1])
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user