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

Unified Diff: tests/compiler/dart2js_extra/js_interop_error_test.dart

Issue 1318043005: Support user generated custom native JS classes. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: ptal Created 5 years, 2 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_extra/js_interop_error_test.dart
diff --git a/tests/language/vm/regress_23238_test.dart b/tests/compiler/dart2js_extra/js_interop_error_test.dart
similarity index 54%
copy from tests/language/vm/regress_23238_test.dart
copy to tests/compiler/dart2js_extra/js_interop_error_test.dart
index 88250b2a9a924295387efae3bf3b086624d69668..3a94472cb7c2d5c42894ba826797d0d327758847 100644
--- a/tests/language/vm/regress_23238_test.dart
+++ b/tests/compiler/dart2js_extra/js_interop_error_test.dart
@@ -3,13 +3,24 @@
// BSD-style license that can be found in the LICENSE file.
import "package:expect/expect.dart";
+import "package:js/js.dart";
sra1 2015/10/06 21:42:18 Add a few more tests in the dart2js_native directo
Jacob 2015/10/13 01:19:24 Done. However put tests in test/html with the othe
+
+class Bar { }
+
+@Js()
+class Foo extends Bar {
+ external get bar;
+}
+
+@Js()
+class Baz {
+ Baz() {}
+ external get foo;
+ void bar() { }
+ get baz;
+}
void main() {
- int x = 327680;
- int r = 65536;
- for (var i = 0; i < 200; i++) {
- Expect.equals(r, x ~/ 5);
- x *= 10;
- r *= 10;
- }
+ /// 01: compile-time error
+ var b = new Bar();
}

Powered by Google App Engine
This is Rietveld 408576698