Skip to content

Commit

Permalink
Reorder tests
Browse files Browse the repository at this point in the history
  • Loading branch information
findepi committed Jul 29, 2020
1 parent f4268a8 commit 5d8d588
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions presto-jdbc/src/test/java/io/prestosql/jdbc/TestJdbcResultSet.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
{
Expand Down

0 comments on commit 5d8d588

Please sign in to comment.