1pub mod traits;
2pub mod logging;
3pub mod kinds;
4pub mod utils;
5pub mod job;
6pub mod command;
7pub mod app;
8pub mod data;
9
10#[cfg(test)]
11mod tests {
12 use serde::{Serialize, Deserialize};
13 use chiral_derive::Serialization;
14 use crate::traits::{Serialization, SerializedFormat};
15
16 #[derive(Serialize, Deserialize, Serialization, PartialEq, Debug)]
17 struct TestStruct {
18 name: String
19 }
20
21 #[test]
22 fn test_serialization() {
23 let ts = TestStruct { name: "hello".to_string() };
24 assert_eq!(ts.ser_to(), r#"{"name":"hello"}"#.to_string());
25 let ts_desser = TestStruct::ser_from(&r#"{"name":"hello"}"#.to_string());
26 assert_eq!(ts_desser, ts);
27 }
28}