/** The string prefix we get for the srid tests */
public static final String SRIDPREFIX = "SRID=" + SRID + ";";
+ /** How much tests did fail? */
+ public static int failcount = 0;
+
/** The actual test method */
public static void test(String WKT, Connection[] conns) throws SQLException {
System.out.println("Original: " + WKT);
System.out.println("Re-Parsed: " + reparsed);
if (!geom.equals(regeom)) {
System.out.println("--- Geometries are not equal!");
+ failcount++;
} else if (!reparsed.equals(parsed)) {
System.out.println("--- Text Reps are not equal!");
+ failcount++;
} else {
System.out.println("Equals: yes");
}
System.out.println("SQLin : " + sqlGeom.toString());
if (!geom.equals(sqlGeom)) {
System.out.println("--- Geometries after SQL are not equal!");
+ failcount++;
} else {
System.out.println("Eq SQL in: yes");
}
} catch (SQLException e) {
System.out.println("--- Server side error: " + e.toString());
+ failcount++;
}
try {
System.out.println("SQLout : " + sqlreGeom.toString());
if (!geom.equals(sqlreGeom)) {
System.out.println("--- reparsed Geometries after SQL are not equal!");
+ failcount++;
} else {
System.out.println("Eq SQLout: yes");
}
} catch (SQLException e) {
System.out.println("--- Server side error: " + e.toString());
+ failcount++;
}
statement.close();
conns[i].close();
}
- System.out.println("Finished.");
+ //System.out.println("Finished.");
+ System.out.println("Finished, " + failcount + " tests failed!");
}
-}
\ No newline at end of file
+}