finite_tests

package
v1.2.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 30, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package finite_tests provides a test suite for finite queues

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TestCapacity

func TestCapacity(t *testing.T, newQueue func(int) interface {
	goqueue.Owner
	goqueue.Enqueuer
	goqueue.Dequeuer
	// goqueue.Length
	finite.Capacity
}) func(*testing.T)

func TestEnqueue

func TestEnqueue(t *testing.T, rate, timeout time.Duration, newQueue func(int) interface {
	goqueue.Owner
	goqueue.Enqueuer
	goqueue.Dequeuer
}) func(*testing.T)

func TestEnqueueEvent added in v1.2.2

func TestEnqueueEvent(t *testing.T, rate, timeout time.Duration, newQueue func(size int) interface {
	goqueue.Owner
	goqueue.Enqueuer
	goqueue.Dequeuer
	goqueue.Event
}) func(*testing.T)

TestEnqueueEvent will confirm the behavior of the signal channel for enqueues, it will operate off of the idea that a fixed queue can utilize a buffered channel such that a signal is received for every item enqueued

func TestEnqueueInFront

func TestEnqueueInFront(t *testing.T, newQueue func(int) interface {
	goqueue.Owner
	goqueue.Enqueuer
	goqueue.EnqueueInFronter
	goqueue.Peeker
}) func(*testing.T)

func TestEnqueueLossy

func TestEnqueueLossy(t *testing.T, newQueue func(int) interface {
	goqueue.Owner
	finite.EnqueueLossy
}) func(*testing.T)

func TestEnqueueMultiple

func TestEnqueueMultiple(t *testing.T, newQueue func(int) interface {
	goqueue.Owner
	goqueue.Enqueuer
}) func(*testing.T)

func TestResize

func TestResize(t *testing.T, newQueue func(int) interface {
	goqueue.Owner
	goqueue.Enqueuer
	finite.Capacity
	finite.Resizer
}) func(*testing.T)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL