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

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

Issue 10993059: Stop using the Hashable interface. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 5bb5f86b64f59d25be98586577bd724d90e9ab66..17a6a438c019dd6c8f3fe436318b0b1e69175a89 100644
--- a/tests/compiler/dart2js_native/core_type_check_native_test.dart
+++ b/tests/compiler/dart2js_native/core_type_check_native_test.dart
@@ -2,75 +2,53 @@
// 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.
-check(value, expectComparable, expectHashable, expectPattern) {
+check(value, expectComparable, expectPattern) {
Expect.equals(expectComparable, value is Comparable);
- Expect.equals(expectHashable, value is Hashable);
Expect.equals(expectPattern, value is Pattern);
}
int inscrutable(int x) => x == 0 ? 0 : x | inscrutable(x & (x - 1));
-class A implements Comparable native "*A" {
+class A native "*A" {
}
-class B implements Hashable native "*B" {
+class B implements Comparable native "*B" {
}
-class C implements Comparable, Hashable native "*C" {
+class C implements Pattern native "*C" {
}
-class D implements Pattern native "*D" {
-}
-
-class E implements Pattern, Comparable native "*E" {
-}
-
-class F implements Pattern, Hashable native "*F" {
-}
-
-class G implements Pattern, Hashable, Comparable native "*G" {
+class D implements Pattern, Comparable native "*D" {
}
makeA() native;
makeB() native;
makeC() native;
makeD() native;
-makeE() native;
-makeF() native;
-makeG() native;
-void setup() native """
-function A() {};
+void setup() native """
+function A() {};
makeA = function() { return new A; }
-function B() {};
+function B() {};
makeB = function() { return new B; }
-function C() {};
+function C() {};
makeC = function() { return new C; }
-function D() {};
+function D() {};
makeD = function() { return new D; }
-function E() {};
-makeE = function() { return new E; }
-function F() {};
-makeF = function() { return new F; }
-function G() {};
-makeG = function() { return new G; }
""";
main() {
setup();
var things = [[], 4, 4.2, 'foo', new Object(), makeA(), makeB(),
- makeC(), makeD(), makeE(), makeF(), makeG()];
-
- check(things[inscrutable(0)], false, false, false); // List
- check(things[inscrutable(1)], true, true, false); // int
- check(things[inscrutable(2)], true, true, false); // num
- check(things[inscrutable(3)], true, true, true); // string
- check(things[inscrutable(4)], false, false, false); // Object
- check(things[inscrutable(5)], true, false, false); // A
- check(things[inscrutable(6)], false, true, false); // B
- check(things[inscrutable(7)], true, true, false); // C
- check(things[inscrutable(8)], false, false, true); // D
- check(things[inscrutable(9)], true, false, true); // E
- check(things[inscrutable(10)], false, true, true); // F
- check(things[inscrutable(11)], true, true, true); // G
+ makeC(), makeD()];
+
+ check(things[inscrutable(0)], false, false); // List
+ check(things[inscrutable(1)], true, false); // int
+ check(things[inscrutable(2)], true, false); // num
+ check(things[inscrutable(3)], true, true); // string
+ check(things[inscrutable(4)], false, false); // Object
+ check(things[inscrutable(5)], false, false); // A
+ check(things[inscrutable(6)], true, false); // B
+ check(things[inscrutable(7)], false, true); // C
+ check(things[inscrutable(8)], true, true); // D
}

Powered by Google App Engine
This is Rietveld 408576698