()
| 135 | |
| 136 | #[test] |
| 137 | fn json_roundtrip() { |
| 138 | let req = NativeRequest { |
| 139 | op: OpCode::Ping, |
| 140 | seq: 1, |
| 141 | fields: RequestFields::Text(TextFields::default()), |
| 142 | }; |
| 143 | let json = sonic_rs::to_vec(&req).unwrap(); |
| 144 | assert_eq!(FrameFormat::detect(json[0]), FrameFormat::Json); |
| 145 | |
| 146 | let decoded = decode_request(&json, FrameFormat::Json).unwrap(); |
| 147 | assert_eq!(decoded.op, OpCode::Ping); |
| 148 | assert_eq!(decoded.seq, 1); |
| 149 | } |
| 150 | |
| 151 | #[test] |
| 152 | fn msgpack_roundtrip() { |
nothing calls this directly
no test coverage detected