Index: tests/language/core_type_check_test.dart |
diff --git a/tests/language/core_type_check_test.dart b/tests/language/core_type_check_test.dart |
index 5d8b60f1f81f5265f956e63670eb924b27b81381..8705f52f4d6850194fa7393f9d5c3302c7bbe5e4 100644 |
--- a/tests/language/core_type_check_test.dart |
+++ b/tests/language/core_type_check_test.dart |
@@ -2,9 +2,8 @@ |
// 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); |
} |
@@ -13,38 +12,26 @@ int inscrutable(int x) => x == 0 ? 0 : x | inscrutable(x & (x - 1)); |
class A implements Comparable { |
} |
-class B implements Hashable { |
+class B { |
Mads Ager (google)
2012/09/27 12:48:27
hep
|
} |
-class C implements Comparable, Hashable { |
+class C implements Pattern { |
} |
-class D implements Pattern { |
-} |
- |
-class E implements Pattern, Comparable { |
-} |
- |
-class F implements Pattern, Hashable { |
-} |
- |
-class G implements Pattern, Hashable, Comparable { |
+class D implements Pattern, Comparable { |
} |
main() { |
var things = [[], 4, 4.2, 'foo', new Object(), new A(), new B(), |
- new C(), new D(), new E(), new F(), new G()]; |
- |
- 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 |
+ new C(), new D()]; |
+ |
+ 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)], true, false); // A |
+ check(things[inscrutable(6)], false, false); // B |
+ check(things[inscrutable(7)], false, true); // C |
+ check(things[inscrutable(8)], true, true); // D |
} |