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;
14mod serde;
15mod data;
16
17#[cfg(test)]
18mod tests {
19 use super::*;
20
21
22 #[test]
23 fn colour_test(){
24 let color = common::Rgb(255, 0, 0);
25 let json = serde_json::to_string(&color).unwrap();
26 assert_eq!(json, "\"rgb(255, 0, 0)\"");
27 println!("Serialized: {}", json);
28 let deserialized: common::Rgb = serde_json::from_str(&json).unwrap();
29 assert_eq!(deserialized, color);
30 println!("Deserialized: {:?}", deserialized);
31 }
32}