aboutsummaryrefslogtreecommitdiffstats
path: root/python/tidy/servo_tidy_tests
diff options
context:
space:
mode:
authorTravis Dean <travis.j.dean@gmail.com>2016-07-04 17:05:20 -0400
committerTravis Dean <travis.j.dean@gmail.com>2016-07-04 18:38:13 -0400
commit664235821731c8d5eaf6d55852a9ee43b30a77f2 (patch)
tree4583dd60d62d5b11622ef7ab82ed61bbbf83fa37 /python/tidy/servo_tidy_tests
parent80cb0cf8214fd52d2884724614c40cb278ee7575 (diff)
downloadservo-664235821731c8d5eaf6d55852a9ee43b30a77f2.tar.gz
servo-664235821731c8d5eaf6d55852a9ee43b30a77f2.zip
Add style check, test, and code fixes for an else brace check.
Diffstat (limited to 'python/tidy/servo_tidy_tests')
-rw-r--r--python/tidy/servo_tidy_tests/rust_tidy.rs6
-rw-r--r--python/tidy/servo_tidy_tests/test_tidy.py1
2 files changed, 7 insertions, 0 deletions
diff --git a/python/tidy/servo_tidy_tests/rust_tidy.rs b/python/tidy/servo_tidy_tests/rust_tidy.rs
index 2b9dd343f2d..9bc37070613 100644
--- a/python/tidy/servo_tidy_tests/rust_tidy.rs
+++ b/python/tidy/servo_tidy_tests/rust_tidy.rs
@@ -41,6 +41,12 @@ impl test {
let x = true;
x
&& x;
+ if x {
+ ;
+ }
+ else {
+ ;
+ }
}
}
diff --git a/python/tidy/servo_tidy_tests/test_tidy.py b/python/tidy/servo_tidy_tests/test_tidy.py
index dbbc77c9e23..4a90f94b6b9 100644
--- a/python/tidy/servo_tidy_tests/test_tidy.py
+++ b/python/tidy/servo_tidy_tests/test_tidy.py
@@ -76,6 +76,7 @@ class CheckTidiness(unittest.TestCase):
self.assertEqual('use &str instead of &String', errors.next()[2])
self.assertEqual('use &T instead of &Root<T>', 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.assertNoMoreErrors(errors)
def test_spec_link(self):