message: Update tests to reflect changes
diff: use std::path::Path;
  -use super::{Driver, Dataset, Feature, FeatureIterator, Geometry};
  +use super::{Driver, Dataset, Feature, FeatureIterator, FieldValue, Geometry, OFT_INTEGER, OFT_REAL, OFT_STRING};
  mod convert_geo;
  @@ -124,15 +124,20 @@ fn test_json() {
  fn test_schema() {
  let mut ds = Dataset::open(fixture!("roads.geojson")).unwrap();
  let layer = ds.layer(0).unwrap();
  - let name_list: Vec<String> = layer
  + let name_list: Vec<(String, i32)> = layer
  .defn().fields()
  - .map(|f| f.name())
  + .map(|f| (f.name(), f.get_type()))
  .collect();
  - let ok_names: Vec<String> = vec!(
  - "kind", "sort_key", "is_link", "is_tunnel",
  - "is_bridge", "railway", "highway")
  - .iter().map(|s| s.to_string()).collect();
  - assert_eq!(name_list, ok_names);
  + let ok_names_types: Vec<(String, i32)> = vec!(
  + ("kind", OFT_STRING),
  + ("sort_key", OFT_REAL),
  + ("is_link", OFT_STRING),
  + ("is_tunnel", OFT_STRING),
  + ("is_bridge", OFT_STRING),
  + ("railway", OFT_STRING),
  + ("highway", OFT_STRING))
  + .iter().map(|s| (s.0.to_string(), s.1)).collect();
  + assert_eq!(name_list, ok_names_types);
  }
  #[test]
  @@ -176,15 +181,20 @@ fn test_write_features() {
  let driver = Driver::get("GeoJSON").unwrap();
  let mut ds = driver.create(fixture!("output.geojson")).unwrap();
  let mut layer = ds.create_layer().unwrap();
  - layer.create_feature(Geometry::from_wkt("POINT (1 2)").unwrap()).unwrap();
  + layer.create_defn_fields(&[("Name", OFT_STRING), ("Value", OFT_REAL), ("Int_value", OFT_INTEGER)]);
  + layer.create_feature_fields(
  + Geometry::from_wkt("POINT (1 2)").unwrap(), &["Name", "Value", "Int_value"],
  + &[FieldValue::StringValue("Feature 1".to_string()), FieldValue::RealValue(45.78), FieldValue::IntegerValue(1)]
  + ).unwrap();
  // dataset is closed here
  }
  let mut ds = Dataset::open(fixture!("output.geojson")).unwrap();
  fs::remove_file(fixture!("output.geojson")).unwrap();
  let layer = ds.layer(0).unwrap();
  - let wkt_list = layer.features()
  - .map(|f| f.geometry().wkt().unwrap())
  - .collect::<Vec<String>>();
  - assert_eq!(wkt_list, vec!("POINT (1 2)"));
  + let ft = layer.features().next().unwrap();
  + assert_eq!(ft.geometry().wkt().unwrap(), "POINT (1 2)");
  + assert_eq!(ft.field("Name").unwrap().as_string(), "Feature 1");
  + assert_eq!(ft.field("Value").unwrap().as_real(), 45.78);
  + assert_eq!(ft.field("Int_value").unwrap().as_int(), 1);
  }
  