1mod options;
2
3pub mod render;
4pub mod common;
5
6pub use options::*;
7
8#[cfg(feature = "time_axis")]
9pub mod time_axis;
10
11
12#[cfg(feature = "chrono_axis")]
13pub mod chrono_axis;
14
15#[cfg(test)]
16mod tests {
17 use super::*;
18
19
20 #[test]
21 fn colour_test(){
22 let color = common::Rgb(255, 0, 0);
23 let json = serde_json::to_string(&color).unwrap();
24 assert_eq!(json, "\"rgb(255, 0, 0)\"");
25 println!("Serialized: {}", json);
26 let deserialized: common::Rgb = serde_json::from_str(&json).unwrap();
27 assert_eq!(deserialized, color);
28 println!("Deserialized: {:?}", deserialized);
29 }
30}