From 5d8d588e48bfb35f50410b4e02fc38dc0a17a8fb Mon Sep 17 00:00:00 2001 From: Piotr Findeisen Date: Mon, 27 Jul 2020 12:41:31 +0200 Subject: [PATCH] Reorder tests --- .../io/prestosql/jdbc/TestJdbcResultSet.java | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/presto-jdbc/src/test/java/io/prestosql/jdbc/TestJdbcResultSet.java b/presto-jdbc/src/test/java/io/prestosql/jdbc/TestJdbcResultSet.java index badf3dfe956f..ff07744a561b 100644 --- a/presto-jdbc/src/test/java/io/prestosql/jdbc/TestJdbcResultSet.java +++ b/presto-jdbc/src/test/java/io/prestosql/jdbc/TestJdbcResultSet.java @@ -116,13 +116,6 @@ public void testPrimitiveTypes() checkRepresentation("cast('foo' as char(5))", Types.CHAR, "foo "); } - @Test - public void testArray() - throws Exception - { - checkRepresentation("ARRAY[1, 2]", Types.ARRAY, (rs, column) -> assertEquals(rs.getArray(column).getArray(), new int[] {1, 2})); - } - @Test public void testDecimal() throws Exception @@ -131,20 +124,6 @@ public void testDecimal() checkRepresentation("DECIMAL '0.1'", Types.DECIMAL, new BigDecimal("0.1")); } - @Test - public void testIpAddress() - throws Exception - { - checkRepresentation("IPADDRESS '1.2.3.4'", Types.JAVA_OBJECT, "1.2.3.4"); - } - - @Test - public void testUuid() - throws Exception - { - checkRepresentation("UUID '0397e63b-2b78-4b7b-9c87-e085fa225dd8'", Types.JAVA_OBJECT, "0397e63b-2b78-4b7b-9c87-e085fa225dd8"); - } - @Test public void testDate() throws Exception @@ -284,6 +263,27 @@ public void testTimestamp() }); } + @Test + public void testIpAddress() + throws Exception + { + checkRepresentation("IPADDRESS '1.2.3.4'", Types.JAVA_OBJECT, "1.2.3.4"); + } + + @Test + public void testUuid() + throws Exception + { + checkRepresentation("UUID '0397e63b-2b78-4b7b-9c87-e085fa225dd8'", Types.JAVA_OBJECT, "0397e63b-2b78-4b7b-9c87-e085fa225dd8"); + } + + @Test + public void testArray() + throws Exception + { + checkRepresentation("ARRAY[1, 2]", Types.ARRAY, (rs, column) -> assertEquals(rs.getArray(column).getArray(), new int[] {1, 2})); + } + private void checkRepresentation(String expression, int expectedSqlType, Object expectedRepresentation) throws Exception {