Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1640)

Unified Diff: test/rule_test.dart

Issue 1754813003: Suppress lints on synthetic nodes/tokens (#193). (Closed) Base URL: https://github.com/dart-lang/linter.git@master
Patch Set: review_fix Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/_data/synthetic/synthetic.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/rule_test.dart
diff --git a/test/rule_test.dart b/test/rule_test.dart
index aeace1606548607d944a270e4b8c84a2da5594cf..5ccc256273d3a6d0080eeb438d32453956e787c5 100644
--- a/test/rule_test.dart
+++ b/test/rule_test.dart
@@ -188,15 +188,7 @@ defineRuleUnitTests() {
];
testEach(good, isLowerCaseUnderScoreWithDots, isTrue);
- var bad = [
- 'Foo',
- 'fooBar.',
- '.foo_Bar',
- '_f',
- 'F_B',
- 'JS',
- 'JSON'
- ];
+ var bad = ['Foo', 'fooBar.', '.foo_Bar', '_f', 'F_B', 'JS', 'JSON'];
testEach(bad, isLowerCaseUnderScoreWithDots, isFalse);
});
group('lowerCamelCase', () {
@@ -286,6 +278,15 @@ defineSanityTests() {
throwsA(new isInstanceOf<TestFailure>()));
});
});
+
+ group('reporting', () {
+ //https://github.com/dart-lang/linter/issues/193
+ group('ignore synthetic nodes', () {
+ String path = p.join('test', '_data', 'synthetic', 'synthetic.dart');
+ File file = new File(path);
+ testRule('non_constant_identifier_names', file);
+ });
+ });
}
/// Handy for debugging.
« no previous file with comments | « test/_data/synthetic/synthetic.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698