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/linker_config_conversion_test.go b/bp2build/linker_config_conversion_test.go
index 4662af4..3b8a363 100644
--- a/bp2build/linker_config_conversion_test.go
+++ b/bp2build/linker_config_conversion_test.go
@@ -21,23 +21,23 @@
 	"android/soong/linkerconfig"
 )
 
-func runLinkerConfigTestCase(t *testing.T, tc bp2buildTestCase) {
+func runLinkerConfigTestCase(t *testing.T, tc Bp2buildTestCase) {
 	t.Helper()
-	(&tc).moduleTypeUnderTest = "linker_config"
-	(&tc).moduleTypeUnderTestFactory = linkerconfig.LinkerConfigFactory
+	(&tc).ModuleTypeUnderTest = "linker_config"
+	(&tc).ModuleTypeUnderTestFactory = linkerconfig.LinkerConfigFactory
 	runBp2BuildTestCaseSimple(t, tc)
 }
 
 func TestLinkerConfigConvertsSrc(t *testing.T) {
 	runLinkerConfigTestCase(t,
-		bp2buildTestCase{
-			blueprint: `
+		Bp2buildTestCase{
+			Blueprint: `
 linker_config {
 	name: "foo",
 	src: "a.json",
 }
 `,
-			expectedBazelTargets: []string{makeBazelTarget("linker_config", "foo", attrNameToString{
+			ExpectedBazelTargets: []string{makeBazelTarget("linker_config", "foo", AttrNameToString{
 				"src": `"a.json"`,
 			})},
 		})
@@ -46,14 +46,14 @@
 
 func TestLinkerConfigNoSrc(t *testing.T) {
 	runLinkerConfigTestCase(t,
-		bp2buildTestCase{
-			blueprint: `
+		Bp2buildTestCase{
+			Blueprint: `
 linker_config {
 	name: "foo",
 }
 `,
-			expectedBazelTargets: []string{},
-			expectedErr:          fmt.Errorf("Android.bp:2:1: module \"foo\": src: empty src is not supported"),
+			ExpectedBazelTargets: []string{},
+			ExpectedErr:          fmt.Errorf("Android.bp:2:1: module \"foo\": src: empty src is not supported"),
 		})
 
 }