blob: 6b267b3b50fc254ca9b4fa25ea073c5433b36fec [file] [log] [blame]
/*
* Copyright (c) 2016, 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.
*/
/**
* @assertion HashMap.fromIterables(Iterable<K> keys, Iterable<V> values)
* It is an error if the two Iterables don't have the same length.
* @description Checks that if two Iterables don't have the same length an error
* occurs. Test the case when values are shorter
* @author sgrekhov@unipro.ru
*/
import "../../../Utils/expect.dart";
import "dart:collection";
main() {
DoubleLinkedQueue keys = new DoubleLinkedQueue();
keys.add(1);
keys.add(2);
keys.add(3);
keys.add(4);
DoubleLinkedQueue values = new DoubleLinkedQueue();
values.add('val1');
values.add('val2');
values.add('val3');
Expect.throws(() {new HashMap.fromIterables(keys, values);});
}