Skip to content
This repository has been archived by the owner on Mar 9, 2023. It is now read-only.

Commit

Permalink
Require serde in tests.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
dabreegster committed Nov 1, 2022
1 parent 4189d18 commit a7b4742
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions osm2lanes/src/test.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
use osm_tag_schemes::{Highway, HighwayType};
use osm_tags::Tags;
use serde::{Deserialize, Serialize};

use crate::locale::DrivingSide;
use crate::road::{Lane, Road};

#[derive(Clone)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "serde", serde(untagged, deny_unknown_fields))]
#[derive(Clone, Serialize, Deserialize)]
#[serde(untagged, deny_unknown_fields)]
pub enum RustTesting {
Enabled(bool),
WithOptions {
Expand All @@ -15,18 +15,16 @@ pub enum RustTesting {
},
}

#[derive(Clone)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "serde", serde(rename_all = "snake_case"))]
#[derive(Clone, Serialize, Deserialize)]
#[serde(rename_all = "snake_case")]
pub enum Expected {
Road(Road),
// TODO: deprecated
Output(Vec<Lane>),
}

#[allow(clippy::module_name_repetitions)]
#[derive(Clone)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[derive(Clone, Serialize, Deserialize)]
pub struct TestCase {
// Metadata
/// The OSM way unique identifier
Expand Down

0 comments on commit a7b4742

Please sign in to comment.