blob: 35dda48be369ed6494323c8b60e7bbb4f8b90f9f [file] [log] [blame]
/*
* Copyright (c) 2011, 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 final int length
* Returns the number of elements in this.
* @description Checks that method returns size of collection.
* @author kaigorodov
*/
import "../../../Utils/expect.dart";
import "dart:collection";
main() {
DoubleLinkedQueue list = new DoubleLinkedQueue();
Expect.isTrue(list.length == 0);
for(int i = 0; i < 100; i++) {
list.addLast(i);
Expect.isTrue(list.length == i+1);
}
}