diff options
author | Francois-Rene Rideau <tunes@google.com> | 2015-08-25 13:30:10 +0000 |
---|---|---|
committer | Lukacs Berki <lberki@google.com> | 2015-08-26 07:37:19 +0000 |
commit | 304e19552571bc007faf98e66e75f2c18e5409f5 (patch) | |
tree | 6fa3bc4bbfcf454da3ab1860651d6902c34b9f80 /src/test/java/com/google/devtools/build/lib/syntax/PrinterTest.java | |
parent | e45d16cb644b8406eaa9d192e6d764e306d1bca5 (diff) |
Refactor skylark format internals
Rename some methods to avoid clashes.
Add function formattable to create lazily-formatted objects,
remove now unused strFormattable and reprFormattable.
Also some whitespace cleanup.
--
MOS_MIGRATED_REVID=101459565
Diffstat (limited to 'src/test/java/com/google/devtools/build/lib/syntax/PrinterTest.java')
-rw-r--r-- | src/test/java/com/google/devtools/build/lib/syntax/PrinterTest.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/syntax/PrinterTest.java b/src/test/java/com/google/devtools/build/lib/syntax/PrinterTest.java index baa1fcb847..97bae069b2 100644 --- a/src/test/java/com/google/devtools/build/lib/syntax/PrinterTest.java +++ b/src/test/java/com/google/devtools/build/lib/syntax/PrinterTest.java @@ -122,12 +122,12 @@ public class PrinterTest { @Test public void testFormatPositional() throws Exception { - assertEquals("foo 3", Printer.formatString("%s %d", makeTuple("foo", 3))); + assertEquals("foo 3", Printer.formatToString("%s %d", makeTuple("foo", 3))); assertEquals("foo 3", Printer.format("%s %d", "foo", 3)); - // Note: formatString doesn't perform scalar x -> (x) conversion; + // Note: formatToString doesn't perform scalar x -> (x) conversion; // The %-operator is responsible for that. - assertThat(Printer.formatString("", makeTuple())).isEmpty(); + assertThat(Printer.formatToString("", makeTuple())).isEmpty(); assertEquals("foo", Printer.format("%s", "foo")); assertEquals("3.14159", Printer.format("%s", 3.14159)); checkFormatPositionalFails("not all arguments converted during string formatting", |