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

Unified Diff: tests/compiler/dart2js_native/abstract_class_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/abstract_class_test.dart
diff --git a/tests/compiler/dart2js_native/abstract_class_test.dart b/tests/compiler/dart2js_native/abstract_class_test.dart
index 18e0af3723467249e10c4e60932a04ee51363df6..d90fe2ecfeaa94e0e75c3f0a69404c6122d1868a 100644
--- a/tests/compiler/dart2js_native/abstract_class_test.dart
+++ b/tests/compiler/dart2js_native/abstract_class_test.dart
@@ -2,8 +2,7 @@
// 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.
-import "dart:_js_helper";
-import "package:expect/expect.dart";
+import "native_testing.dart";
// Native classes can have subclasses that are not declared to the program. The
// subclasses are indistinguishable from the base class. This means that
@@ -29,17 +28,17 @@ function B(){}
B.prototype.foo = function() { return 'B.foo'; };
makeA = function(){return new A};
makeB = function(){return new B};
+self.nativeConstructor(A);
+self.nativeConstructor(B);
""";
-var inscrutable;
main() {
+ nativeTesting();
setup();
- inscrutable = (x) => x;
- inscrutable = inscrutable(inscrutable);
var a = makeA();
var b = makeB();
- var c = inscrutable(new C());
+ var c = confuse(new C());
Expect.isTrue(a is A);
Expect.isFalse(b is A);
« no previous file with comments | « sdk/lib/_internal/js_runtime/lib/native_helper.dart ('k') | tests/compiler/dart2js_native/bound_closure_super_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698