From 0ac212afb18c98ea929368e9ccf21101e7a8921c Mon Sep 17 00:00:00 2001 From: Hugo Thiessard Date: Wed, 21 Sep 2016 23:50:18 +0200 Subject: Issue #13350 Report tidy error for space after ( --- python/tidy/servo_tidy_tests/rust_tidy.rs | 8 ++++++++ python/tidy/servo_tidy_tests/test_tidy.py | 3 +++ 2 files changed, 11 insertions(+) (limited to 'python/tidy/servo_tidy_tests') diff --git a/python/tidy/servo_tidy_tests/rust_tidy.rs b/python/tidy/servo_tidy_tests/rust_tidy.rs index 9bc37070613..358fce3a082 100644 --- a/python/tidy/servo_tidy_tests/rust_tidy.rs +++ b/python/tidy/servo_tidy_tests/rust_tidy.rs @@ -49,4 +49,12 @@ impl test { } } + type Text_Fun3 = fn( i32) -> i32; + + fn test_fun3( y: Text_Fun3) { + test_fun( 1); + } + + // Should not be triggered + macro_rules! test_macro ( ( $( $fun:ident = $flag:ident ; )* ) => ()); } diff --git a/python/tidy/servo_tidy_tests/test_tidy.py b/python/tidy/servo_tidy_tests/test_tidy.py index 998967c617f..52371b944bb 100644 --- a/python/tidy/servo_tidy_tests/test_tidy.py +++ b/python/tidy/servo_tidy_tests/test_tidy.py @@ -109,6 +109,9 @@ class CheckTidiness(unittest.TestCase): self.assertEqual('use &T instead of &Root', errors.next()[2]) self.assertEqual('operators should go at the end of the first line', errors.next()[2]) self.assertEqual('else braces should be on the same line', errors.next()[2]) + self.assertEqual('extra space after (', errors.next()[2]) + self.assertEqual('extra space after (', errors.next()[2]) + self.assertEqual('extra space after (', errors.next()[2]) self.assertNoMoreErrors(errors) def test_spec_link(self): -- cgit v1.2.3