Literal array conversion of primitive arrays (#11500)

* [android] - literal array conversion of primitives types
This commit is contained in:
Tobrun
2018-03-22 12:40:43 -04:00
committed by GitHub
parent 4dc191b8da
commit 1eb90c1448
3 changed files with 39 additions and 1 deletions

View File

@@ -1081,4 +1081,12 @@ public class ExpressionTest {
String actual = literal(array).toString();
assertEquals("literal array should match", expected, actual);
}
@Test
public void testLiteralPrimitiveArrayConversion() throws Exception {
float[] array = new float[] {0.2f, 0.5f};
Object[] expected = new Object[] {"literal", new Object[] {0.2f, 0.5f}};
Object[] actual = literal(array).toArray();
assertEquals("primitive array should be convered", expected, actual);
}
}