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

Function test_ml_encoder

plugins/src/codec.rs:168–181  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

unwrapMethod · 0.45
encodeMethod · 0.45

Tested by

no test coverage detected