blob: 0c752f2a5e44bde98082d4976a431b4c014f51d8 [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
);
}