Options
All
  • Public
  • Public/Protected
  • All
Menu

Module queue/Queue.common-spec

Index

Variables

Const DEADPILL

DEADPILL: 3735928559 = 0xDEADBEEF

An element used by some unit tests to signal the end of data insertion.

Const QUEUE_DELTA_TIME

QUEUE_DELTA_TIME: 5 = 5

Time interval in milliseconds which some unit tests use to continuously insert elements into the queue.

Functions

runCommonQueueTests

  • Run common queue tests, i.e. this function calls it() for each of its unit tests.

    Parameters

    • queueCreator: (() => IAsyncQueue<number>) | (() => IAsyncLimitedQueue<number>)

      A "factory function" for queue objects, which is run before each test.

    • COUNT: number

      Each test guarantees that it only holds up to COUNT many elements in the queue at the same time. In case of IAsyncQueue, the caller must provide a value of COUNT <= LIMIT of the respective queue. Otherwise, some tests might run into deadlocks.

    Returns void

Generated using TypeDoc