summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
eadb37e)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
private checkSize (size: number): void {
if (!Number.isSafeInteger(size)) {
throw new TypeError(
private checkSize (size: number): void {
if (!Number.isSafeInteger(size)) {
throw new TypeError(
- `Invalid circular buffer size: ${size} is not an integer`
+ `Invalid circular buffer size: '${size}' is not an integer`
private checkSize (size: number): void {
if (!Number.isSafeInteger(size)) {
throw new TypeError(
private checkSize (size: number): void {
if (!Number.isSafeInteger(size)) {
throw new TypeError(
- `Invalid fixed priority queue size: ${size} is not an integer`
+ `Invalid fixed priority queue size: '${size}' is not an integer`
it('Verify that circular buffer size is valid at instance creation', () => {
expect(() => new CircularBuffer(0.25)).toThrow(
it('Verify that circular buffer size is valid at instance creation', () => {
expect(() => new CircularBuffer(0.25)).toThrow(
- new TypeError('Invalid circular buffer size: 0.25 is not an integer')
+ new TypeError("Invalid circular buffer size: '0.25' is not an integer")
)
expect(() => new CircularBuffer(-1)).toThrow(
new RangeError('Invalid circular buffer size: -1 < 0')
)
expect(() => new CircularBuffer(Number.MAX_SAFE_INTEGER + 1)).toThrow(
new TypeError(
)
expect(() => new CircularBuffer(-1)).toThrow(
new RangeError('Invalid circular buffer size: -1 < 0')
)
expect(() => new CircularBuffer(Number.MAX_SAFE_INTEGER + 1)).toThrow(
new TypeError(
- `Invalid circular buffer size: ${
+ `Invalid circular buffer size: '${
Number.MAX_SAFE_INTEGER + 1
Number.MAX_SAFE_INTEGER + 1
// describe('Fixed priority queue test suite', () => {
// it('Verify constructor() behavior', () => {
// expect(() => new FixedPriorityQueue('')).toThrow(
// describe('Fixed priority queue test suite', () => {
// it('Verify constructor() behavior', () => {
// expect(() => new FixedPriorityQueue('')).toThrow(
-// new TypeError('Invalid fixed priority queue size: is not an integer')
+// new TypeError('Invalid fixed priority queue size: '' is not an integer')
// )
// expect(() => new FixedPriorityQueue(-1)).toThrow(
// new RangeError('Invalid fixed priority queue size: -1 < 0')
// )
// expect(() => new FixedPriorityQueue(-1)).toThrow(
// new RangeError('Invalid fixed priority queue size: -1 < 0')