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

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

Issue 2383273002: Revert "Add native_testing library to mock @Native classes" (Closed)
Patch Set: Created 4 years, 3 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_native/core_type_check_native_test.dart
diff --git a/tests/compiler/dart2js_native/core_type_check_native_test.dart b/tests/compiler/dart2js_native/core_type_check_native_test.dart
index 307509f5f9d55ff85fbf2b40d40cf77dc098685e..261acf7f757db901afa2036b61c4d44218d4e9de 100644
--- a/tests/compiler/dart2js_native/core_type_check_native_test.dart
+++ b/tests/compiler/dart2js_native/core_type_check_native_test.dart
@@ -2,7 +2,10 @@
// 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 "native_testing.dart";
+import "dart:_js_helper";
+import "package:expect/expect.dart";
+
+var inscrutable = (int x) => x == 0 ? 0 : x | inscrutable(x & (x - 1));
@Native("A")
class A {}
@@ -30,11 +33,6 @@ function C() {};
makeC = function() { return new C; }
function D() {};
makeD = function() { return new D; }
-
-self.nativeConstructor(A);
-self.nativeConstructor(B);
-self.nativeConstructor(C);
-self.nativeConstructor(D);
""";
checkTest(value, expectComparable, expectPattern) {
@@ -67,7 +65,7 @@ checkAll(check) {
makeC(),
makeD()
];
- value(i) => confuse(things[i]);
+ value(i) => things[inscrutable(i)];
check(value(0), false, false); // List
check(value(1), true, false); // int
@@ -81,7 +79,6 @@ checkAll(check) {
}
main() {
- nativeTesting();
setup();
checkAll(checkTest);

Powered by Google App Engine
This is Rietveld 408576698