servo: Merge #10713 - add tidy test for space after ":" in stucts (from aeischeid:master); r=jdm

Addresses issue #10702

the tidy self-test doesn't seem to catch the `member_name:"Foo"` line like it should. the regex follows similar pattern in the file and works in my regex tester tool, so not really sure what is going on there.

Source-Repo: https://github.com/servo/servo
Source-Revision: 8c2c0bd964bfbf1a2d7494bd8fbbdd263173ef7d
This commit is contained in:
aeischeid
2016-05-11 16:27:37 -07:00
parent 2931854720
commit 089ce7d073
3 changed files with 9 additions and 2 deletions

View File

@@ -29,6 +29,10 @@ impl test {
2 => 1,
};
let z = &Vec<T>;
struct Member {
member_name:"Foo"
member_id:5
}
}
fn test_fun2(y : &String, z : &Vec<f32>) -> f32 {

View File

@@ -66,6 +66,8 @@ class CheckTidiness(unittest.TestCase):
self.assertEqual('missing space before -', errors.next()[2])
self.assertEqual('missing space before *', errors.next()[2])
self.assertEqual('missing space after =>', errors.next()[2])
self.assertEqual('missing space after :', errors.next()[2])
self.assertEqual('missing space after :', errors.next()[2])
self.assertEqual('extra space before :', errors.next()[2])
self.assertEqual('extra space before :', errors.next()[2])
self.assertEqual('use &[T] instead of &Vec<T>', errors.next()[2])