blob: 11d65bda84b29d328319f6a119f1f9bfa1cb3eec [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.
// @dart = 2.9
/// @assertion void insertBefore(E entry)
/// ...
/// This entry must be in a linked list when this method is called. The [entry]
/// must not be in a linked list.
/// @description Checks that the entry inserted must not be in any linked list
/// @author
import "dart:collection";
import "../../../Utils/expect.dart";
import "LinkedListEntry.lib.dart";
main() {
LinkedList<MyLinkedListEntry> list1 =
new LinkedList<MyLinkedListEntry<int>>();
LinkedList<MyLinkedListEntry> list2 =
new LinkedList<MyLinkedListEntry<int>>();
MyLinkedListEntry<int> entry1 = new MyLinkedListEntry<int>(1);
MyLinkedListEntry<int> entry2 = new MyLinkedListEntry<int>(2);
Expect.throws(() {