export Java variables to Bazel
Test: build/bazel/bp2build.sh
Change-Id: Ia06f9265c9f96e6add6edbd0cee925fe37b430d3
diff --git a/starlark_fmt/format_test.go b/starlark_fmt/format_test.go
index 90f78ef..9450a31 100644
--- a/starlark_fmt/format_test.go
+++ b/starlark_fmt/format_test.go
@@ -18,6 +18,10 @@
"testing"
)
+func simpleFormat(s string) string {
+ return "%s"
+}
+
func TestPrintEmptyStringList(t *testing.T) {
in := []string{}
indentLevel := 0
@@ -54,7 +58,7 @@
func TestPrintEmptyList(t *testing.T) {
in := []string{}
indentLevel := 0
- out := PrintList(in, indentLevel, "%s")
+ out := PrintList(in, indentLevel, simpleFormat)
expectedOut := "[]"
if out != expectedOut {
t.Errorf("Expected %q, got %q", expectedOut, out)
@@ -64,7 +68,7 @@
func TestPrintSingleElementList(t *testing.T) {
in := []string{"1"}
indentLevel := 0
- out := PrintList(in, indentLevel, "%s")
+ out := PrintList(in, indentLevel, simpleFormat)
expectedOut := `[1]`
if out != expectedOut {
t.Errorf("Expected %q, got %q", expectedOut, out)
@@ -74,7 +78,7 @@
func TestPrintMultiElementList(t *testing.T) {
in := []string{"1", "2"}
indentLevel := 0
- out := PrintList(in, indentLevel, "%s")
+ out := PrintList(in, indentLevel, simpleFormat)
expectedOut := `[
1,
2,
@@ -87,7 +91,7 @@
func TestListWithNonZeroIndent(t *testing.T) {
in := []string{"1", "2"}
indentLevel := 1
- out := PrintList(in, indentLevel, "%s")
+ out := PrintList(in, indentLevel, simpleFormat)
expectedOut := `[
1,
2,