()
| 1055 | |
| 1056 | #[test] |
| 1057 | fn nested_binary_expression() { |
| 1058 | let source = r" |
| 1059 | a = ( |
| 1060 | (5 # trailing left comment |
| 1061 | * |
| 1062 | 2) |
| 1063 | + # trailing operator comment |
| 1064 | # leading right comment |
| 1065 | 3 |
| 1066 | ) |
| 1067 | "; |
| 1068 | let test_case = CommentsTestCase::from_code(source); |
| 1069 | |
| 1070 | let comments = test_case.to_comments(); |
| 1071 | |
| 1072 | assert_debug_snapshot!(comments.debug(test_case.source_code)); |
| 1073 | } |
| 1074 | |
| 1075 | #[test] |
| 1076 | fn while_trailing_end_of_line_comment() { |
nothing calls this directly
no test coverage detected