()
| 118 | |
| 119 | #[test] |
| 120 | fn extract_multiple_fields() { |
| 121 | let buf = encode(&json!({"a": 10, "b": 20, "c": 30})); |
| 122 | |
| 123 | let (s, _) = extract_field(&buf, 0, "a").unwrap(); |
| 124 | assert_eq!(read_i64(&buf, s), Some(10)); |
| 125 | |
| 126 | let (s, _) = extract_field(&buf, 0, "b").unwrap(); |
| 127 | assert_eq!(read_i64(&buf, s), Some(20)); |
| 128 | |
| 129 | let (s, _) = extract_field(&buf, 0, "c").unwrap(); |
| 130 | assert_eq!(read_i64(&buf, s), Some(30)); |
| 131 | } |
| 132 | |
| 133 | #[test] |
| 134 | fn extract_nested_path() { |
nothing calls this directly
no test coverage detected