Queue
должен иметь метод enqueue
.
testString: 'assert((function(){var test = new Queue(); return (typeof test.enqueue === "function")}()), "Your Queue
class should have a enqueue
method.");'
- text: Класс Queue
должен иметь метод dequeue
.
testString: 'assert((function(){var test = new Queue(); return (typeof test.dequeue === "function")}()), "Your Queue
class should have a dequeue
method.");'
- text: Класс Queue
должен иметь front
метод.
testString: 'assert((function(){var test = new Queue(); return (typeof test.front === "function")}()), "Your Queue
class should have a front
method.");'
- text: Класс Queue
должен иметь метод size
.
testString: 'assert((function(){var test = new Queue(); return (typeof test.size === "function")}()), "Your Queue
class should have a size
method.");'
- text: Класс Queue
должен иметь метод isEmpty
.
testString: 'assert((function(){var test = new Queue(); return (typeof test.isEmpty === "function")}()), "Your Queue
class should have an isEmpty
method.");'
- text: Метод dequeue
должен удалять и возвращать передний элемент очереди
testString: 'assert((function(){var test = new Queue(); test.enqueue("Smith"); return (test.dequeue() === "Smith")}()), "The dequeue
method should remove and return the front element of the queue");'
- text: ''
testString: 'assert((function(){var test = new Queue(); test.enqueue("Smith"); test.enqueue("John"); return (test.front() === "Smith")}()), "The front
method should return value of the front element of the queue");'
- text: Метод size
должен возвращать длину очереди
testString: 'assert((function(){var test = new Queue(); test.enqueue("Smith"); return (test.size() === 1)}()), "The size
method should return the length of the queue");'
- text: Метод isEmpty
должен возвращать false
если в очереди есть элементы
testString: 'assert((function(){var test = new Queue(); test.enqueue("Smith"); return !(test.isEmpty())}()), "The isEmpty
method should return false
if there are elements in the queue");'
```