From 981b94b4609b34b880bc8b85fc51fed4daf94d17 Mon Sep 17 00:00:00 2001 From: Paul Duffin Date: Thu, 11 Mar 2021 12:32:12 +0000 Subject: Switch CheckSnapshot from a testSdkResult method to a function This will allow the testSdkResult to be replaced with the TestResult when switching sdk package to use test fixtures. Bug: 181070625 Test: m nothing Change-Id: Ieca63f4c189f5e804102aeb4073289ea03143b6e --- sdk/java_sdk_test.go | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'sdk/java_sdk_test.go') diff --git a/sdk/java_sdk_test.go b/sdk/java_sdk_test.go index f6d508d23..ef8e4a00d 100644 --- a/sdk/java_sdk_test.go +++ b/sdk/java_sdk_test.go @@ -127,7 +127,7 @@ func TestSdkDependsOnSourceEvenWhenPrebuiltPreferred(t *testing.T) { // Make sure that the mysdk module depends on "sdkmember" and not "prebuilt_sdkmember". java.CheckModuleDependencies(t, result.TestContext, "mysdk", "android_common", []string{"sdkmember"}) - result.CheckSnapshot("mysdk", "", + CheckSnapshot(result, "mysdk", "", checkAndroidBpContents(`// This is auto-generated. DO NOT EDIT. java_import { @@ -255,7 +255,7 @@ func TestSnapshotWithJavaHeaderLibrary(t *testing.T) { } `) - result.CheckSnapshot("mysdk", "", + CheckSnapshot(result, "mysdk", "", checkAndroidBpContents(` // This is auto-generated. DO NOT EDIT. @@ -312,7 +312,7 @@ func TestHostSnapshotWithJavaHeaderLibrary(t *testing.T) { } `) - result.CheckSnapshot("mysdk", "", + CheckSnapshot(result, "mysdk", "", checkAndroidBpContents(` // This is auto-generated. DO NOT EDIT. @@ -369,7 +369,7 @@ func TestDeviceAndHostSnapshotWithJavaHeaderLibrary(t *testing.T) { } `) - result.CheckSnapshot("mysdk", "", + CheckSnapshot(result, "mysdk", "", checkAndroidBpContents(` // This is auto-generated. DO NOT EDIT. @@ -440,7 +440,7 @@ func TestSnapshotWithJavaImplLibrary(t *testing.T) { } `) - result.CheckSnapshot("myexports", "", + CheckSnapshot(result, "myexports", "", checkAndroidBpContents(` // This is auto-generated. DO NOT EDIT. @@ -496,7 +496,7 @@ func TestSnapshotWithJavaBootLibrary(t *testing.T) { } `) - result.CheckSnapshot("myexports", "", + CheckSnapshot(result, "myexports", "", checkAndroidBpContents(` // This is auto-generated. DO NOT EDIT. @@ -551,7 +551,7 @@ func TestHostSnapshotWithJavaImplLibrary(t *testing.T) { } `) - result.CheckSnapshot("myexports", "", + CheckSnapshot(result, "myexports", "", checkAndroidBpContents(` // This is auto-generated. DO NOT EDIT. @@ -607,7 +607,7 @@ func TestSnapshotWithJavaTest(t *testing.T) { } `) - result.CheckSnapshot("myexports", "", + CheckSnapshot(result, "myexports", "", checkAndroidBpContents(` // This is auto-generated. DO NOT EDIT. @@ -662,7 +662,7 @@ func TestHostSnapshotWithJavaTest(t *testing.T) { } `) - result.CheckSnapshot("myexports", "", + CheckSnapshot(result, "myexports", "", checkAndroidBpContents(` // This is auto-generated. DO NOT EDIT. @@ -731,7 +731,7 @@ func TestSnapshotWithJavaSystemModules(t *testing.T) { } `) - result.CheckSnapshot("mysdk", "", + CheckSnapshot(result, "mysdk", "", checkAndroidBpContents(` // This is auto-generated. DO NOT EDIT. @@ -827,7 +827,7 @@ func TestHostSnapshotWithJavaSystemModules(t *testing.T) { } `) - result.CheckSnapshot("mysdk", "", + CheckSnapshot(result, "mysdk", "", checkAndroidBpContents(` // This is auto-generated. DO NOT EDIT. @@ -918,7 +918,7 @@ func TestDeviceAndHostSnapshotWithOsSpecificMembers(t *testing.T) { } `) - result.CheckSnapshot("myexports", "", + CheckSnapshot(result, "myexports", "", checkAndroidBpContents(` // This is auto-generated. DO NOT EDIT. @@ -1032,7 +1032,7 @@ func TestSnapshotWithJavaSdkLibrary(t *testing.T) { } `) - result.CheckSnapshot("mysdk", "", + CheckSnapshot(result, "mysdk", "", checkAndroidBpContents(` // This is auto-generated. DO NOT EDIT. @@ -1133,7 +1133,7 @@ func TestSnapshotWithJavaSdkLibrary_SdkVersion_None(t *testing.T) { } `) - result.CheckSnapshot("mysdk", "", + CheckSnapshot(result, "mysdk", "", checkAndroidBpContents(` // This is auto-generated. DO NOT EDIT. @@ -1202,7 +1202,7 @@ func TestSnapshotWithJavaSdkLibrary_SdkVersion_ForScope(t *testing.T) { } `) - result.CheckSnapshot("mysdk", "", + CheckSnapshot(result, "mysdk", "", checkAndroidBpContents(` // This is auto-generated. DO NOT EDIT. @@ -1274,7 +1274,7 @@ func TestSnapshotWithJavaSdkLibrary_ApiScopes(t *testing.T) { } `) - result.CheckSnapshot("mysdk", "", + CheckSnapshot(result, "mysdk", "", checkAndroidBpContents(` // This is auto-generated. DO NOT EDIT. @@ -1367,7 +1367,7 @@ func TestSnapshotWithJavaSdkLibrary_ModuleLib(t *testing.T) { } `) - result.CheckSnapshot("mysdk", "", + CheckSnapshot(result, "mysdk", "", checkAndroidBpContents(` // This is auto-generated. DO NOT EDIT. @@ -1475,7 +1475,7 @@ func TestSnapshotWithJavaSdkLibrary_SystemServer(t *testing.T) { } `) - result.CheckSnapshot("mysdk", "", + CheckSnapshot(result, "mysdk", "", checkAndroidBpContents(` // This is auto-generated. DO NOT EDIT. @@ -1563,7 +1563,7 @@ func TestSnapshotWithJavaSdkLibrary_NamingScheme(t *testing.T) { } `) - result.CheckSnapshot("mysdk", "", + CheckSnapshot(result, "mysdk", "", checkAndroidBpContents(` // This is auto-generated. DO NOT EDIT. @@ -1639,7 +1639,7 @@ func TestSnapshotWithJavaSdkLibrary_DoctagFiles(t *testing.T) { } `) - result.CheckSnapshot("mysdk", "", + CheckSnapshot(result, "mysdk", "", checkAndroidBpContents(` // This is auto-generated. DO NOT EDIT. -- cgit v1.2.3