export common bp2build testing functions

bp2buildTestCase
attrNameToString
runBp2BuildTestCase
makeBazelTargetNoRestrictions

The testing framework defined in the bp2build package can only be used
from within the package because many common testing functions are
private to the package. This prevents modules defined in Soong
plugins (e.g. system/tools/aidl/build) from testing bp2build conversions.

Test: go test ./bp2build
Change-Id: Ia867081327c5181d04687b13c4550e68e6a11f86
diff --git a/bp2build/gensrcs_conversion_test.go b/bp2build/gensrcs_conversion_test.go
index 7682663..4845973 100644
--- a/bp2build/gensrcs_conversion_test.go
+++ b/bp2build/gensrcs_conversion_test.go
@@ -24,7 +24,7 @@
 	testcases := []struct {
 		name               string
 		bp                 string
-		expectedBazelAttrs attrNameToString
+		expectedBazelAttrs AttrNameToString
 	}{
 		{
 			name: "gensrcs with common usage of properties",
@@ -37,7 +37,7 @@
                 output_extension: "out",
                 bazel_module: { bp2build_available: true },
 			}`,
-			expectedBazelAttrs: attrNameToString{
+			expectedBazelAttrs: AttrNameToString{
 				"srcs": `[
         "test/input.txt",
         ":external_files__BP2BUILD__MISSING__DEP",
@@ -56,7 +56,7 @@
                 cmd: "cat $(in) > $(out)",
                 bazel_module: { bp2build_available: true },
 			}`,
-			expectedBazelAttrs: attrNameToString{
+			expectedBazelAttrs: AttrNameToString{
 				"srcs": `["input.txt"]`,
 				"cmd":  `"cat $(SRC) > $(OUT)"`,
 			},
@@ -65,15 +65,15 @@
 
 	for _, test := range testcases {
 		expectedBazelTargets := []string{
-			makeBazelTargetNoRestrictions("gensrcs", "foo", test.expectedBazelAttrs),
+			MakeBazelTargetNoRestrictions("gensrcs", "foo", test.expectedBazelAttrs),
 		}
 		t.Run(test.name, func(t *testing.T) {
-			runBp2BuildTestCase(t, func(ctx android.RegistrationContext) {},
-				bp2buildTestCase{
-					moduleTypeUnderTest:        "gensrcs",
-					moduleTypeUnderTestFactory: genrule.GenSrcsFactory,
-					blueprint:                  test.bp,
-					expectedBazelTargets:       expectedBazelTargets,
+			RunBp2BuildTestCase(t, func(ctx android.RegistrationContext) {},
+				Bp2buildTestCase{
+					ModuleTypeUnderTest:        "gensrcs",
+					ModuleTypeUnderTestFactory: genrule.GenSrcsFactory,
+					Blueprint:                  test.bp,
+					ExpectedBazelTargets:       expectedBazelTargets,
 				})
 		})
 	}