mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 22:54:58 +00:00
Emit more detailed highlighting for %
, >>
, <<
This commit is contained in:
parent
5fae65dd28
commit
6da1228898
3 changed files with 85 additions and 4 deletions
|
@ -841,6 +841,30 @@ fn foo() {
|
|||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_operators() {
|
||||
check_highlighting(
|
||||
r##"
|
||||
fn main() {
|
||||
1 + 1 - 1 * 1 / 1 % 1 | 1 & 1 ! 1 ^ 1 >> 1 << 1;
|
||||
let mut a = 0;
|
||||
a += 1;
|
||||
a -= 1;
|
||||
a *= 1;
|
||||
a /= 1;
|
||||
a %= 1;
|
||||
a |= 1;
|
||||
a &= 1;
|
||||
a ^= 1;
|
||||
a >>= 1;
|
||||
a <<= 1;
|
||||
}
|
||||
"##,
|
||||
expect_file!["./test_data/highlight_operators.html"],
|
||||
false,
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_rainbow_highlighting() {
|
||||
check_highlighting(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue