Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide/src/syntax_highlighting/tests.rs')
| -rw-r--r-- | crates/ide/src/syntax_highlighting/tests.rs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/crates/ide/src/syntax_highlighting/tests.rs b/crates/ide/src/syntax_highlighting/tests.rs index 0af743431b..efd03c2823 100644 --- a/crates/ide/src/syntax_highlighting/tests.rs +++ b/crates/ide/src/syntax_highlighting/tests.rs @@ -842,6 +842,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( r#" |