()
| 465 | |
| 466 | #[test] |
| 467 | fn formatter_basic_example_works() { |
| 468 | let mut fmt = Formatter::new(Language::Rust); |
| 469 | fmt.line("Hello line 1"); |
| 470 | fmt.indent_push(); |
| 471 | fmt.comment("Nested comment"); |
| 472 | fmt.indent_pop(); |
| 473 | fmt.line("Back home again"); |
| 474 | let expected_lines = vec![ |
| 475 | "Hello line 1\n", |
| 476 | " // Nested comment\n", |
| 477 | "Back home again\n", |
| 478 | ]; |
| 479 | assert_eq!(fmt.lines, expected_lines); |
| 480 | } |
| 481 | |
| 482 | #[test] |
| 483 | fn get_indent_works() { |
nothing calls this directly
no test coverage detected