1
0
mirror of https://github.com/musix-org/musix-oss synced 2024-09-20 17:11:57 +00:00
musix-oss/node_modules/ref/test/char.js

18 lines
382 B
JavaScript
Raw Normal View History

2020-03-03 20:30:50 +00:00
var assert = require('assert')
var ref = require('../')
describe('char', function () {
it('should accept a JS String, and write the first char\'s code', function () {
var val = 'a'
var buf = ref.alloc('char', val)
assert.strictEqual(val.charCodeAt(0), buf.deref())
buf = ref.alloc('uchar', val)
assert.strictEqual(val.charCodeAt(0), buf.deref())
})
})