// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file // 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. // Tests of hash set type checking. library hash_set_type_check_test; import "package:expect/expect.dart"; import 'dart:collection'; // TODO: all this test does now is verify that lookup takes a non-T // should merge this with `hash_test_test`. testSet(Set newSet()) { Set s = newSet(); Expect.isNull(s.lookup(1)); } void main() { testSet(() => new Set()); testSet(() => new HashSet()); testSet(() => new LinkedHashSet()); testSet(() => new Set.identity()); testSet(() => new HashSet.identity()); testSet(() => new LinkedHashSet.identity()); testSet(() => new HashSet( equals: (x, y) => identical(x, y), hashCode: (x) => identityHashCode(x))); testSet(() => new LinkedHashSet( equals: (x, y) => identical(x, y), hashCode: (x) => identityHashCode(x))); }