[android] - add quotes to toString representation of a String literal
This commit is contained in:
@@ -1101,7 +1101,7 @@ public class ExpressionTest {
|
||||
|
||||
@Test
|
||||
public void testExpressionConcatToString() throws Exception {
|
||||
String expected = "[\"concat\", foo, bar]";
|
||||
String expected = "[\"concat\", \"foo\", \"bar\"]";
|
||||
String actual = concat(literal("foo"), literal("bar")).toString();
|
||||
assertEquals("toString should match", expected, actual);
|
||||
}
|
||||
@@ -1116,7 +1116,7 @@ public class ExpressionTest {
|
||||
@Test
|
||||
public void testExpressionExponentialToString() throws Exception {
|
||||
String expected = "[\"interpolate\", [\"cubic-bezier\", 1.0, 1.0, 1.0, 1.0],"
|
||||
+ " [\"get\", x], 0.0, 100.0, 100.0, 200.0]";
|
||||
+ " [\"get\", \"x\"], 0.0, 100.0, 100.0, 200.0]";
|
||||
String actual = interpolate(cubicBezier(literal(1), literal(1), literal(1), literal(1)),
|
||||
get(literal("x")), literal(0), literal(100), literal(100), literal(200)).toString();
|
||||
assertEquals("toString should match", expected, actual);
|
||||
@@ -1367,4 +1367,11 @@ public class ExpressionTest {
|
||||
String actual = collator(literal(false), eq(literal(2), literal(1)), literal("it")).toString();
|
||||
assertEquals("expression should match", expected, actual);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testStringReverseConversion() {
|
||||
String expected = "[\"to-string\", [\"get\", \"name_en\"]]";
|
||||
String actual = Expression.toString(get("name_en")).toString();
|
||||
assertEquals("Reverse string conversion should match", expected, actual);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user