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

Unified Diff: third_party/pkg/angular/perf/lexer_perf.dart

Issue 124053002: Adding Angular and dependent packages for testing (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 12 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: third_party/pkg/angular/perf/lexer_perf.dart
diff --git a/third_party/pkg/angular/perf/lexer_perf.dart b/third_party/pkg/angular/perf/lexer_perf.dart
new file mode 100644
index 0000000000000000000000000000000000000000..60345c21fcee642267af373837158bcb4703f159
--- /dev/null
+++ b/third_party/pkg/angular/perf/lexer_perf.dart
@@ -0,0 +1,20 @@
+library lexer_perf;
+
+import '_perf.dart';
+import 'package:angular/core/parser/parser_library.dart';
+
+main() {
+ Lexer lexer = new Lexer();
+ time('ident', () =>
+ lexer.call('ctrl foo baz ctrl.foo ctrl.bar ctrl.baz'));
+ time('ident-path', () =>
+ lexer.call('a.b a.b.c a.b.c.d a.b.c.d.e.f'));
+ time('num', () =>
+ lexer.call('1 23 34 456 12341234 12351235'));
+ time('num-double', () =>
+ lexer.call('.0 .1 .12 0.123 0.1234'));
+ time('string', () =>
+ lexer.call("'quick brown dog and fox say what'"));
+ time('string-escapes', () =>
+ lexer.call("quick '\\' brown \u1234 dog and fox\n\rsay what'"));
+}

Powered by Google App Engine
This is Rietveld 408576698