MCPcopy Create free account
hub / github.com/apache/thrift / must_write_bytes

Function must_write_bytes

lib/rs/src/protocol/binary.rs:1001–1011  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

999
1000 #[test]
1001 fn must_write_bytes() {
1002 let (_, mut o_prot) = test_objects(true);
1003
1004 let bytes: [u8; 10] = [0x0A, 0xCC, 0xD1, 0x84, 0x99, 0x12, 0xAB, 0xBB, 0x45, 0xDF];
1005
1006 assert!(o_prot.write_bytes(&bytes).is_ok());
1007
1008 let buf = o_prot.transport.write_bytes();
1009 assert_eq!(&buf[0..4], [0x00, 0x00, 0x00, 0x0A]); // length
1010 assert_eq!(&buf[4..], bytes); // actual bytes
1011 }
1012
1013 #[test]
1014 fn must_write_uuid() {

Callers

nothing calls this directly

Calls 2

test_objectsFunction · 0.70
write_bytesMethod · 0.45

Tested by

no test coverage detected