()
| 481 | |
| 482 | #[test] |
| 483 | fn get_indent_works() { |
| 484 | let mut fmt = Formatter::new(Language::Rust); |
| 485 | let expected_results = vec!["", " ", " ", ""]; |
| 486 | |
| 487 | let actual_results = Vec::with_capacity(4); |
| 488 | (0..3).for_each(|_| { |
| 489 | fmt.get_indent(); |
| 490 | fmt.indent_push(); |
| 491 | }); |
| 492 | (0..3).for_each(|_| fmt.indent_pop()); |
| 493 | fmt.get_indent(); |
| 494 | |
| 495 | actual_results |
| 496 | .into_iter() |
| 497 | .zip(expected_results) |
| 498 | .for_each(|(actual, expected): (String, &str)| assert_eq!(&actual, expected)); |
| 499 | } |
| 500 | |
| 501 | #[test] |
| 502 | fn fmt_can_add_type_to_lines() { |
nothing calls this directly
no test coverage detected