Documentation ¶
Index ¶
- Variables
- func CommonTestClear(t *testing.T, queue_under_test Queue)
- func CommonTestDequeueN(t *testing.T, queue_under_test Queue)
- func CommonTestEnqueue(t *testing.T, queue_under_test Queue)
- func CommonTestIter(t *testing.T, queue_under_test Queue)
- func CommonTestPosition(t *testing.T, queue_under_test Queue)
- func CommonTestRemove(t *testing.T, queue_under_test Queue)
- func CommonTestRemoveFirst(t *testing.T, queue_under_test Queue)
- func CommonTestRemoveLast(t *testing.T, queue_under_test Queue)
- func CommonTestRemoveMiddle(t *testing.T, queue_under_test Queue)
- func CommonTestSize(t *testing.T, queue_under_test Queue)
- func GetPosition(err error) (position int)
- func SetPosition(pos int) errors.ErrorOption
- type Queue
- type TestQueue
- func (q *TestQueue) Clear() error
- func (q *TestQueue) DequeueN(n int) (taken []TestQueueable, num_left int, err error)
- func (q *TestQueue) Enqueue(datum *TestQueueable) (int, error)
- func (q *TestQueue) Iter(fn func(int, *TestQueueable) bool) error
- func (q *TestQueue) Position(tq *TestQueueable) (int, error)
- func (q *TestQueue) Remove(tq *TestQueueable) error
- func (q *TestQueue) Size() (int, error)
- type TestQueueable
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Error = errors.NewClass("queue") NotFound = Error.NewClass("not found", errors.NoCaptureStack()) AlreadyEnqueued = Error.NewClass("already enqueued", errors.NoCaptureStack()) )
Functions ¶
func CommonTestClear ¶
func CommonTestDequeueN ¶
func CommonTestEnqueue ¶
func CommonTestIter ¶
func CommonTestPosition ¶
func CommonTestRemove ¶
func CommonTestRemoveFirst ¶
func CommonTestRemoveLast ¶
func CommonTestRemoveMiddle ¶
func CommonTestSize ¶
func GetPosition ¶
func SetPosition ¶
func SetPosition(pos int) errors.ErrorOption
Types ¶
type TestQueue ¶
type TestQueue struct {
// contains filtered or unexported fields
}
func NewTestQueue ¶
func (*TestQueue) DequeueN ¶
func (q *TestQueue) DequeueN(n int) ( taken []TestQueueable, num_left int, err error)
func (*TestQueue) Remove ¶
func (q *TestQueue) Remove(tq *TestQueueable) error
type TestQueueable ¶
Click to show internal directories.
Click to hide internal directories.