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

Unified Diff: tests/compiler/dart2js/sourcemaps/invokes_test_file.dart

Issue 1196433002: Create and test source mapping for invocations. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Rebased Created 5 years, 6 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: tests/compiler/dart2js/sourcemaps/invokes_test_file.dart
diff --git a/tests/compiler/dart2js/sourcemaps/invokes_test_file.dart b/tests/compiler/dart2js/sourcemaps/invokes_test_file.dart
new file mode 100644
index 0000000000000000000000000000000000000000..9c0655022e48765d4b6d15cb7447a62ef66a0d02
--- /dev/null
+++ b/tests/compiler/dart2js/sourcemaps/invokes_test_file.dart
@@ -0,0 +1,127 @@
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Test file for testing source mappings of invocations.
+
+var counter = 0;
+var bucket;
+
+main(args) {
+ counter++;
+ invokes(args);
+ return counter;
+}
+
+invokes(parameter) {
+ counter++;
+ toplevelFunction();
+ toplevelField();
+ toplevelFinalField();
+ toplevelConstField();
+ toplevelGetter();
+ C.staticFunction();
+ C.staticField();
+ C.staticFinalField();
+ C.staticConstField();
+ C.staticGetter();
+
+ var localVariable = () {
+ counter++;
+ };
+ localFunction() {
+ counter++;
+ }
+
+ parameter();
+ localVariable();
+ localFunction();
+
+ parameter.dynamicInvoke();
+ new C(parameter).instanceInvokes();
+}
+
+toplevelFunction() {
+ counter++;
+}
+
+var toplevelField = () {
+ counter++;
+};
+
+final toplevelFinalField = toplevelFunction;
+
+const toplevelConstField = toplevelFunction;
+
+get toplevelGetter => () {
+ counter++;
+};
+
+typedef F();
+
+class B {
+ B(parameter);
+
+ superMethod() {
+ counter++;
+ }
+
+ var superField = () {
+ counter++;
+ };
+
+ get superGetter => () {
+ counter++;
+ };
+
+}
+
+class C<T> extends B {
+ C(parameter) : super(parameter);
+
+ static staticFunction() {
+ counter++;
+ }
+
+ static var staticField = () {
+ counter++;
+ };
+
+ static final staticFinalField = staticFunction;
+
+ static const staticConstField = staticFunction;
+
+ static get staticGetter => () {
+ counter++;
+ };
+
+ instanceMethod() {
+ counter++;
+ }
+
+ var instanceField = () {
+ counter++;
+ };
+
+ get instanceGetter => () {
+ counter++;
+ };
+
+ instanceInvokes() {
+ instanceMethod();
+ this.instanceMethod();
+ instanceField();
+ this.instanceField();
+ instanceGetter();
+ this.instanceGetter();
+
+ super.superMethod();
+ super.superField();
+ super.superGetter();
+
+ C();
+ dynamic();
+ F();
+ T();
+ }
+}
« no previous file with comments | « tests/compiler/dart2js/sourcemaps/colors.dart ('k') | tests/compiler/dart2js/sourcemaps/source_mapping_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698