summaryrefslogtreecommitdiff
path: root/sdk/sdk_test.go
diff options
context:
space:
mode:
author Paul Duffin <paulduffin@google.com> 2021-03-12 12:19:43 +0000
committer Paul Duffin <paulduffin@google.com> 2021-03-13 15:59:33 +0000
commit36474d322bcbc463b94c546315b5db00591d0236 (patch)
treeeb13926096bad694fd3dab1d8d8465c2da2bfe48 /sdk/sdk_test.go
parente84b1338c567fa13c54235366fd94640ce7f23e6 (diff)
Stop sdk package depending on testing.T being embedded in TestResult
This change is in preparation for removing testing.T from TestResult. Bug: 181070625 Test: m nothing Change-Id: I67535aff0d894e6e3d8456b75540f340af853355
Diffstat (limited to 'sdk/sdk_test.go')
-rw-r--r--sdk/sdk_test.go21
1 files changed, 8 insertions, 13 deletions
diff --git a/sdk/sdk_test.go b/sdk/sdk_test.go
index 65a9001e6..05d8bdb92 100644
--- a/sdk/sdk_test.go
+++ b/sdk/sdk_test.go
@@ -169,7 +169,7 @@ func TestSnapshotVisibility(t *testing.T) {
"package/Android.bp": []byte(packageBp),
})
- CheckSnapshot(result, "mysdk", "package",
+ CheckSnapshot(t, result, "mysdk", "package",
checkAndroidBpContents(`
// This is auto-generated. DO NOT EDIT.
@@ -317,9 +317,8 @@ func TestSdkInstall(t *testing.T) {
`
result := testSdkWithFs(t, sdk, nil)
- CheckSnapshot(result, "mysdk", "",
- checkAllOtherCopyRules(`.intermediates/mysdk/common_os/mysdk-current.zip -> mysdk-current.zip`),
- )
+ CheckSnapshot(t, result, "mysdk", "",
+ checkAllOtherCopyRules(`.intermediates/mysdk/common_os/mysdk-current.zip -> mysdk-current.zip`))
}
type EmbeddedPropertiesStruct struct {
@@ -387,12 +386,10 @@ func TestCommonValueOptimization(t *testing.T) {
extractor := newCommonValueExtractor(common)
- h := android.TestHelper{t}
-
err := extractor.extractCommonProperties(common, structs)
- h.AssertDeepEquals("unexpected error", nil, err)
+ android.AssertDeepEquals(t, "unexpected error", nil, err)
- h.AssertDeepEquals("common properties not correct",
+ android.AssertDeepEquals(t, "common properties not correct",
&testPropertiesStruct{
name: "common",
private: "",
@@ -410,7 +407,7 @@ func TestCommonValueOptimization(t *testing.T) {
},
common)
- h.AssertDeepEquals("updated properties[0] not correct",
+ android.AssertDeepEquals(t, "updated properties[0] not correct",
&testPropertiesStruct{
name: "struct-0",
private: "common",
@@ -428,7 +425,7 @@ func TestCommonValueOptimization(t *testing.T) {
},
structs[0])
- h.AssertDeepEquals("updated properties[1] not correct",
+ android.AssertDeepEquals(t, "updated properties[1] not correct",
&testPropertiesStruct{
name: "struct-1",
private: "common",
@@ -462,10 +459,8 @@ func TestCommonValueOptimization_InvalidArchSpecificVariants(t *testing.T) {
extractor := newCommonValueExtractor(common)
- h := android.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:
+ android.AssertErrorMessageEquals(t, "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)
}