diff options
Diffstat (limited to 'python/tidy/servo_tidy_tests')
-rw-r--r-- | python/tidy/servo_tidy_tests/rust_tidy.rs | 9 | ||||
-rw-r--r-- | python/tidy/servo_tidy_tests/test_tidy.py | 2 |
2 files changed, 11 insertions, 0 deletions
diff --git a/python/tidy/servo_tidy_tests/rust_tidy.rs b/python/tidy/servo_tidy_tests/rust_tidy.rs index 7a65de0ffcc..bb1b4e00572 100644 --- a/python/tidy/servo_tidy_tests/rust_tidy.rs +++ b/python/tidy/servo_tidy_tests/rust_tidy.rs @@ -63,4 +63,13 @@ impl test { let var = "val"; + + fn test_fun4() + { + } + let var = if true { + "true" + } else { // Should not trigger + "false" + } // Should not trigger } diff --git a/python/tidy/servo_tidy_tests/test_tidy.py b/python/tidy/servo_tidy_tests/test_tidy.py index a50d92b241e..07dbaa020dc 100644 --- a/python/tidy/servo_tidy_tests/test_tidy.py +++ b/python/tidy/servo_tidy_tests/test_tidy.py @@ -131,6 +131,8 @@ class CheckTidiness(unittest.TestCase): self.assertEqual('extra space after (', errors.next()[2]) self.assertEqual('extra space after test_fun', errors.next()[2]) self.assertEqual('no = in the beginning of line', errors.next()[2]) + self.assertEqual('space before { is not a multiple of 4', errors.next()[2]) + self.assertEqual('space before } is not a multiple of 4', errors.next()[2]) self.assertNoMoreErrors(errors) feature_errors = tidy.collect_errors_for_files(iterFile('lib.rs'), [], [tidy.check_rust], print_text=False) |