()
| 699 | |
| 700 | #[test] |
| 701 | fn missing_comma_between_properties() { |
| 702 | let text = r#"{ |
| 703 | "name": "alice" |
| 704 | "age": 25 |
| 705 | }"#; |
| 706 | let result = parse_to_ast(text, &Default::default(), &Default::default()).unwrap(); |
| 707 | assert_eq!( |
| 708 | result |
| 709 | .value |
| 710 | .unwrap() |
| 711 | .as_object() |
| 712 | .unwrap() |
| 713 | .get_number("age") |
| 714 | .unwrap() |
| 715 | .value, |
| 716 | "25" |
| 717 | ); |
| 718 | |
| 719 | // but is strict when strict |
| 720 | assert_has_strict_error(text, "Expected comma on line 2 column 18"); |
| 721 | } |
| 722 | |
| 723 | #[test] |
| 724 | fn missing_comma_with_comment_between_properties() { |
nothing calls this directly
no test coverage detected
searching dependent graphs…