(mut write_fn: F, strict: bool)
| 1087 | } |
| 1088 | |
| 1089 | fn assert_no_write<F>(mut write_fn: F, strict: bool) |
| 1090 | where |
| 1091 | F: FnMut(&mut TBinaryOutputProtocol<WriteHalf<TBufferChannel>>) -> crate::Result<()>, |
| 1092 | { |
| 1093 | let (_, mut o_prot) = test_objects(strict); |
| 1094 | assert!(write_fn(&mut o_prot).is_ok()); |
| 1095 | assert_eq!(o_prot.transport.write_bytes().len(), 0); |
| 1096 | } |
| 1097 | |
| 1098 | #[test] |
| 1099 | fn must_enforce_recursion_depth_limit() { |