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

Unified Diff: tests/language/symbol_conflict_test.dart

Issue 1256583002: Avoid creating illegal symbols in symbol_conflict_test. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 5 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 | « tests/language/language_analyzer2.status ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/symbol_conflict_test.dart
diff --git a/tests/language/symbol_conflict_test.dart b/tests/language/symbol_conflict_test.dart
index d896c9edb8134cffbe1cb710e2aeb01adc5d220a..10b949e7b7180d60ed9a88d41c1db2158d381f19 100644
--- a/tests/language/symbol_conflict_test.dart
+++ b/tests/language/symbol_conflict_test.dart
@@ -26,6 +26,13 @@ main() {
/**
The following constant was generated with the following program:
+ const RESERVED_WORDS = const [
+ 'assert', 'break', 'case', 'catch', 'class', 'const', 'continue',
+ 'default', 'do', 'else', 'enum', 'extends', 'false', 'final',
+ 'finally', 'for', 'if', 'in', 'is', 'new', 'null', 'rethrow',
+ 'return', 'super', 'switch', 'this', 'throw', 'true', 'try',
+ 'var', 'void', 'while', 'with'];
+
get chars sync* {
for (int i = "a".codeUnitAt(0); i <= "z".codeUnitAt(0); i++) {
yield new String.fromCharCodes([i]);
@@ -44,7 +51,9 @@ main() {
// Two character symbols.
for (String c1 in chars) {
for (String c2 in chars) {
- print(" const Symbol('$c1$c2'),");
+ if (!RESERVED_WORDS.contains('$c1$c2')) {
karlklose 2015/07/24 08:27:57 You could actually make a multi-test that also tes
Paul Berry 2015/07/24 13:26:25 Actually there is already a test which verifies th
+ print(" const Symbol('$c1$c2'),");
+ }
}
}
print("];");
@@ -273,7 +282,6 @@ const oneAndTwoCharacterSymbols = const [
const Symbol('dl'),
const Symbol('dm'),
const Symbol('dn'),
- const Symbol('do'),
const Symbol('dp'),
const Symbol('dq'),
const Symbol('dr'),
@@ -524,7 +532,6 @@ const oneAndTwoCharacterSymbols = const [
const Symbol('ic'),
const Symbol('id'),
const Symbol('ie'),
- const Symbol('if'),
const Symbol('ig'),
const Symbol('ih'),
const Symbol('ii'),
@@ -532,12 +539,10 @@ const oneAndTwoCharacterSymbols = const [
const Symbol('ik'),
const Symbol('il'),
const Symbol('im'),
- const Symbol('in'),
const Symbol('io'),
const Symbol('ip'),
const Symbol('iq'),
const Symbol('ir'),
- const Symbol('is'),
const Symbol('it'),
const Symbol('iu'),
const Symbol('iv'),
« no previous file with comments | « tests/language/language_analyzer2.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698