2013-01-07 11:23:16 +00:00
|
|
|
// Copyright (c) 2012, 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.
|
|
|
|
|
2013-01-21 13:34:02 +00:00
|
|
|
library queue.first.test;
|
|
|
|
|
2013-04-05 19:43:16 +00:00
|
|
|
import "package:expect/expect.dart";
|
2013-01-21 13:34:02 +00:00
|
|
|
import 'dart:collection' show Queue;
|
|
|
|
|
2013-01-07 11:23:16 +00:00
|
|
|
main() {
|
|
|
|
Queue<int> queue1 = new Queue<int>();
|
2017-04-17 21:52:57 +00:00
|
|
|
queue1..add(11)..add(12)..add(13);
|
2013-01-07 11:23:16 +00:00
|
|
|
Queue queue2 = new Queue();
|
|
|
|
|
|
|
|
Expect.equals(11, queue1.first);
|
2017-10-17 23:37:15 +00:00
|
|
|
Expect.throwsStateError(() => queue2.first);
|
2013-01-07 11:23:16 +00:00
|
|
|
}
|