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

Unified Diff: test/dart_codegen/expect/_internal/symbol.dart

Issue 963593002: Disable formatting and add new-lines to make tests faster. (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 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
Index: test/dart_codegen/expect/_internal/symbol.dart
diff --git a/test/dart_codegen/expect/_internal/symbol.dart b/test/dart_codegen/expect/_internal/symbol.dart
index 1d5e453e842a943e65fa29cf3f378415d7cb5905..c934fa56b5ffb4c6751812ab70aeda2c4baa892d 100644
--- a/test/dart_codegen/expect/_internal/symbol.dart
+++ b/test/dart_codegen/expect/_internal/symbol.dart
@@ -1,37 +1,29 @@
part of dart._internal;
-
-class Symbol implements core.Symbol {
- final String _name;
- static const String reservedWordRE =
- r'(?:assert|break|c(?:a(?:se|tch)|lass|on(?:st|tinue))|d(?:efault|o)|' r'e(?:lse|num|xtends)|f(?:alse|inal(?:ly)?|or)|i[fns]|n(?:ew|ull)|' r'ret(?:hrow|urn)|s(?:uper|witch)|t(?:h(?:is|row)|r(?:ue|y))|' r'v(?:ar|oid)|w(?:hile|ith))';
- static const String publicIdentifierRE =
- r'(?!' '$reservedWordRE' r'\b(?!\$))[a-zA-Z$][\w$]*';
- static const String identifierRE =
- r'(?!' '$reservedWordRE' r'\b(?!\$))[a-zA-Z$_][\w$]*';
- static const String operatorRE =
- r'(?:[\-+*/%&|^]|\[\]=?|==|~/?|<[<=]?|>[>=]?|unary-)';
- static final RegExp publicSymbolPattern = new RegExp(
- '^(?:$operatorRE\$|$publicIdentifierRE(?:=?\$|[.](?!\$)))+?\$');
- static final RegExp symbolPattern =
- new RegExp('^(?:$operatorRE\$|$identifierRE(?:=?\$|[.](?!\$)))+?\$');
- const Symbol(String name) : this._name = name;
- const Symbol.unvalidated(this._name);
- Symbol.validated(String name) : this._name = validatePublicSymbol(name);
- bool operator ==(other) => other is Symbol && _name == other._name;
- int get hashCode {
- const arbitraryPrime = 664597;
- return 0x1fffffff & (arbitraryPrime * _name.hashCode);
+ class Symbol implements core.Symbol {final String _name;
+ static const String reservedWordRE = r'(?:assert|break|c(?:a(?:se|tch)|lass|on(?:st|tinue))|d(?:efault|o)|' r'e(?:lse|num|xtends)|f(?:alse|inal(?:ly)?|or)|i[fns]|n(?:ew|ull)|' r'ret(?:hrow|urn)|s(?:uper|witch)|t(?:h(?:is|row)|r(?:ue|y))|' r'v(?:ar|oid)|w(?:hile|ith))';
+ static const String publicIdentifierRE = r'(?!' '$reservedWordRE' r'\b(?!\$))[a-zA-Z$][\w$]*';
+ static const String identifierRE = r'(?!' '$reservedWordRE' r'\b(?!\$))[a-zA-Z$_][\w$]*';
+ static const String operatorRE = r'(?:[\-+*/%&|^]|\[\]=?|==|~/?|<[<=]?|>[>=]?|unary-)';
+ static final RegExp publicSymbolPattern = new RegExp('^(?:$operatorRE\$|$publicIdentifierRE(?:=?\$|[.](?!\$)))+?\$');
+ static final RegExp symbolPattern = new RegExp('^(?:$operatorRE\$|$identifierRE(?:=?\$|[.](?!\$)))+?\$');
+ const Symbol(String name) : this._name = name;
+ const Symbol.unvalidated(this._name);
+ Symbol.validated(String name) : this._name = validatePublicSymbol(name);
+ bool operator ==(other) => other is Symbol && _name == other._name;
+ int get hashCode {
+ const arbitraryPrime = 664597;
+ return 0x1fffffff & (arbitraryPrime * _name.hashCode);
}
- toString() => 'Symbol("$_name")';
- static String getName(Symbol symbol) => symbol._name;
- static String validatePublicSymbol(String name) {
- if (name.isEmpty || publicSymbolPattern.hasMatch(name)) return name;
- if (name.startsWith('_')) {
- throw new ArgumentError('"$name" is a private identifier');
+ toString() => 'Symbol("$_name")';
+ static String getName(Symbol symbol) => symbol._name;
+ static String validatePublicSymbol(String name) {
+ if (name.isEmpty || publicSymbolPattern.hasMatch(name)) return name;
+ if (name.startsWith('_')) {
+ throw new ArgumentError('"$name" is a private identifier');
}
- throw new ArgumentError('"$name" is not a valid (qualified) symbol name');
+ throw new ArgumentError('"$name" is not a valid (qualified) symbol name');
}
- static bool isValidSymbol(String name) {
- return (name.isEmpty || symbolPattern.hasMatch(name));
+ static bool isValidSymbol(String name) {
+ return (name.isEmpty || symbolPattern.hasMatch(name));
}
}

Powered by Google App Engine
This is Rietveld 408576698