blob: 3d99dd532e9b935a895b337aabeaa75d9f296011 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
'use strict';
require('../common');
const assert = require('assert');
assert.doesNotThrow(function() {
Buffer.allocUnsafe(10);
});
assert.throws(function() {
Buffer.from(10, 'hex');
});
assert.doesNotThrow(function() {
Buffer.from('deadbeaf', 'hex');
});
|