From ab73f3d61d895289898821272f6af2665c9c645c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20DAVID?= Date: Mon, 21 Aug 2017 22:56:05 +0200 Subject: Automatically verify that derive() lists are alphabetically ordered --- python/tidy/servo_tidy_tests/rust_tidy.rs | 1 + python/tidy/servo_tidy_tests/test_tidy.py | 1 + 2 files changed, 2 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 bed4664a279..c1be1695156 100644 --- a/python/tidy/servo_tidy_tests/rust_tidy.rs +++ b/python/tidy/servo_tidy_tests/rust_tidy.rs @@ -21,6 +21,7 @@ extern crate webrender_api; extern crate style_traits; #[foo = "bar,baz"] +#[derive(Copy,Debug, ComputeSquaredDistance)] impl test { fn test_fun(y:f32)->f32{ diff --git a/python/tidy/servo_tidy_tests/test_tidy.py b/python/tidy/servo_tidy_tests/test_tidy.py index df8bf316cd0..73a37cd4612 100644 --- a/python/tidy/servo_tidy_tests/test_tidy.py +++ b/python/tidy/servo_tidy_tests/test_tidy.py @@ -107,6 +107,7 @@ class CheckTidiness(unittest.TestCase): self.assertTrue('mod declaration is not in alphabetical order' in errors.next()[2]) self.assertEqual('mod declaration spans multiple lines', errors.next()[2]) self.assertTrue('extern crate declaration is not in alphabetical order' in errors.next()[2]) + self.assertTrue('derivable traits list is not in alphabetical order' in errors.next()[2]) self.assertEqual('found an empty line following a {', errors.next()[2]) self.assertEqual('missing space before ->', errors.next()[2]) self.assertEqual('missing space after ->', errors.next()[2]) -- cgit v1.2.3