(String[] args)
| 16 | public class OGRTest |
| 17 | { |
| 18 | public static void main(String[] args) throws Exception |
| 19 | { |
| 20 | ogr.RegisterAll(); |
| 21 | DataSource poDS = ogr.Open("tmp_test/iso_8859_1.csv", false); |
| 22 | Layer lyr = poDS.GetLayer(0); |
| 23 | FieldDefn fld_defn = lyr.GetLayerDefn().GetFieldDefn(1); |
| 24 | String got = fld_defn.GetName(); |
| 25 | if (!got.equals("field_")) |
| 26 | throw new Exception("Got '" + got + "'"); |
| 27 | byte[] byteArray = fld_defn.GetNameAsByteArray(); |
| 28 | if(!Arrays.equals(byteArray, new byte[]{'f', 'i', 'e', 'l', 'd', '_', 0xE9 - 256, 'x'})) |
| 29 | throw new Exception("GetNameAsByteArray() returned unexpected content of size " + byteArray.length); |
| 30 | } |
| 31 | } |
nothing calls this directly
no test coverage detected