()
| 68 | |
| 69 | #[test] |
| 70 | fn test_to_json_line_format() { |
| 71 | let event = test_event(); |
| 72 | let line = event.to_json_line().unwrap(); |
| 73 | |
| 74 | // Must be a single line ending with \n |
| 75 | assert!(line.ends_with('\n')); |
| 76 | assert_eq!(line.matches('\n').count(), 1); |
| 77 | |
| 78 | // Must parse back to the same JSON |
| 79 | let parsed: serde_json::Value = serde_json::from_str(line.trim()).unwrap(); |
| 80 | assert_eq!(parsed, event.to_json().unwrap()); |
| 81 | } |
| 82 | |
| 83 | #[test] |
| 84 | fn test_optional_fields_omitted() { |
nothing calls this directly
no test coverage detected