blob: d2f9617705037ae9a5ccb47e218fd87f24ed6759 [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 a StateError is thrown when this is empty.
* @author kaigorodov
*/
import "../../../Utils/expect.dart";
import "dart:collection";
import "LinkedList.lib.dart";
main() {
LinkedList<MyLinkedListEntry> a = new LinkedList<MyLinkedListEntry>();
Expect.throws(() {
a.first;
},
(e)=> e is StateError
);
}