blob: 2a18cfdf6ec5d7bbab43a17cabf151db7923d7f2 [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 E first
/// Returns the first element.
/// @description Checks that the first element of the list is returned.
/// @author kaigorodov
import "../../../Utils/expect.dart";
import "dart:collection";
import "LinkedList.lib.dart";
main() {
MyLinkedListEntry head = new MyLinkedListEntry("head");
LinkedList<MyLinkedListEntry> a = new LinkedList<MyLinkedListEntry>();
Expect.equals(0, a.length);
Expect.equals(head, a.first);
a.add(new MyLinkedListEntry(1));
Expect.equals(head, a.first);