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

Unified Diff: tests/compiler/dart2js_native/issue9182_test.dart

Issue 2379173002: Add native_testing library to mock @Native classes (Closed)
Patch Set: xxx Created 4 years, 1 month 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_native/issue9182_test.dart
diff --git a/tests/compiler/dart2js_native/issue9182_test.dart b/tests/compiler/dart2js_native/issue9182_test.dart
index 5e06b3585abe89cef9631d455a381991f50f755c..1b5d1acc837902c129b358897910a1f6dff31241 100644
--- a/tests/compiler/dart2js_native/issue9182_test.dart
+++ b/tests/compiler/dart2js_native/issue9182_test.dart
@@ -5,8 +5,7 @@
// Regression test for Issue 9182. The generative constructor body function
// should not have the interceptor calling convention.
-import "dart:_js_helper";
-import "package:expect/expect.dart";
+import "native_testing.dart";
@Native("A")
class Foo {
@@ -28,16 +27,17 @@ class Bar {
void setup() native r"""
function A(){}
makeA = function() { return new A; };
+self.nativeConstructor(A);
""";
makeA() native ;
main() {
+ nativeTesting();
setup();
- var things = [new Foo(), new Bar(30, 40)];
- var foo = things[0];
- var bar = things[1];
+ var foo = confuse(new Foo());
+ var bar = confuse(new Bar(30, 40));
Expect.equals(123, foo.Bar()); // Ensure that Foo.Bar is used.
« no previous file with comments | « tests/compiler/dart2js_native/is_check_test.dart ('k') | tests/compiler/dart2js_native/js_constant_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698