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: front方法应该返回队列的front元素的值
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");'
```