Lines Matching refs:dangerous
11 var dangerous = require('./dangerous') variable
17 t.notEqual(safer, dangerous)
18 t.notEqual(index, dangerous)
23 [index, safer, dangerous].forEach(function (impl) {
35 [index, safer, dangerous].forEach(function (impl) {
49 [index, safer, dangerous].forEach(function (impl) {
61 [dangerous].forEach(function (impl) {
70 [index, safer, dangerous].forEach(function (impl) {
81 [index, safer, dangerous].forEach(function (impl) {
92 [index, safer, dangerous].forEach(function (impl) {
101 [index, safer, dangerous].forEach(function (impl) {
111 [index, safer, dangerous].forEach(function (impl) {
119 [index, safer, dangerous].forEach(function (impl) {
128 Object.keys(dangerous).forEach(function (method) {
130 [index, safer, dangerous].forEach(function (impl) {
131 t.equal(impl[method], dangerous[method], method)
137 Object.keys(dangerous.Buffer).forEach(function (method) {
139 [index, safer, dangerous].forEach(function (impl) {
140 t.equal(impl.Buffer[method], dangerous.Buffer[method], method)
150 [index, safer, dangerous].forEach(function (impl) {
166 t.ok(buffer.Buffer.isBuffer(dangerous.Buffer[method](0)))
167 t.ok(buffer.Buffer.isBuffer(dangerous.Buffer[method](10)))
173 [index, safer, dangerous].forEach(function (impl) {
189 t.equal(dangerous.Buffer.allocUnsafe(arg).constructor, buffer.Buffer)
190 t.equal(dangerous.Buffer.allocUnsafeSlow(arg).constructor, buffer.SlowBuffer(0).constructor)
196 [index, safer, dangerous].forEach(function (impl) {
227 t.throws(function () { dangerous.Buffer[method]('') })
228 t.throws(function () { dangerous.Buffer[method]('string') })
229 t.throws(function () { dangerous.Buffer[method]('string', 'utf-8') })
230 t.throws(function () { dangerous.Buffer[method](2 * (1 << 30)) })
231 t.throws(function () { dangerous.Buffer[method](Infinity) })
232 if (dangerous.Buffer[method] === buffer.Buffer.allocUnsafe) {
235 t.throws(function () { dangerous.Buffer[method](-10) })
236 t.throws(function () { dangerous.Buffer[method](-1e90) })
237 t.throws(function () { dangerous.Buffer[method](-Infinity) })
239 t.throws(function () { dangerous.Buffer[method](null) })
240 t.throws(function () { dangerous.Buffer[method](undefined) })
241 t.throws(function () { dangerous.Buffer[method]() })
242 t.throws(function () { dangerous.Buffer[method]([]) })
243 t.throws(function () { dangerous.Buffer[method]([0, 42, 3]) })
244 t.throws(function () { dangerous.Buffer[method]({}) })
250 [index, safer, dangerous].forEach(function (impl) {
262 t.equal(dangerous.Buffer[method](0).length, 0)
263 t.equal(dangerous.Buffer[method](10).length, 10)
270 t.equal(index.Buffer.alloc, dangerous.Buffer.alloc)
273 dangerous.Buffer.allocUnsafe,
274 dangerous.Buffer.allocUnsafeSlow
289 t.equal(index.Buffer.alloc, dangerous.Buffer.alloc)
314 var buf = dangerous.Buffer[method](length)
334 t.equal(index.Buffer.alloc, dangerous.Buffer.alloc)
352 t.equal(index.Buffer.alloc, dangerous.Buffer.alloc)
382 [index, safer, dangerous].forEach(function (impl) {
395 [index, safer, dangerous].forEach(function (impl) {