Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
test: updating description
This description was fixed. Test are working fine, but the description was not correct
  • Loading branch information
Angelfire committed Jun 21, 2019
commit 0b2acb3970e1b34355569e3c46c9b14e4e7a9780
12 changes: 6 additions & 6 deletions test/parallel/test-buffer-failed-alloc-typed-arrays.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
'use strict';
"use strict";

require('../common');
const assert = require('assert');
const SlowBuffer = require('buffer').SlowBuffer;
require("../common");
const assert = require("assert");
const SlowBuffer = require("buffer").SlowBuffer;

// Test failed or zero-sized Buffer allocations not affecting typed arrays.
// This test exists because of a regression that occurred. Because Buffer
Expand All @@ -12,7 +12,7 @@ const SlowBuffer = require('buffer').SlowBuffer;
// whether or not to zero-fill was not being reset, causing TypedArrays to
// allocate incorrectly.
const zeroArray = new Uint32Array(10).fill(0);
const sizes = [1e10, 0, 0.1, -1, 'a', undefined, null, NaN];
const sizes = [1e10, 0, 0.1, -1, "a", undefined, null, NaN];
const allocators = [
Buffer,
SlowBuffer,
Expand All @@ -23,7 +23,7 @@ const allocators = [
for (const allocator of allocators) {
for (const size of sizes) {
try {
// These allocations are known to fail. If they do,
// Some of these allocations are known to fail. If they do,
// Uint32Array should still produce a zeroed out result.
allocator(size);
} catch {
Expand Down