MCPcopy Create free account
hub / github.com/ElementsProject/lightning / test_ml_encoder

Function test_ml_encoder

cln-rpc/src/codec.rs:169–182  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

167
168 #[test]
169 fn test_ml_encoder() {
170 let tests = vec!["test"];
171
172 for t in tests.iter() {
173 let mut buf = BytesMut::new();
174 let mut codec = MultiLineCodec::default();
175 let mut expected = BytesMut::new();
176 expected.put_slice(t.as_bytes());
177 expected.put_u8(b'\n');
178 expected.put_u8(b'\n');
179 codec.encode(t, &mut buf).unwrap();
180 assert_eq!(buf, expected);
181 }
182 }
183
184 #[test]
185 fn test_json_codec() {

Callers

nothing calls this directly

Calls 2

unwrapMethod · 0.45
encodeMethod · 0.45

Tested by

no test coverage detected