Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add another type coersion test

  • Loading branch information...
commit 7246c2b106ba82eacd128db63144a6fda4f6a456 1 parent 0099c89
@TooTallNate authored
Showing with 9 additions and 0 deletions.
  1. +9 −0 test/coerce.js
View
9 test/coerce.js
@@ -11,7 +11,16 @@ describe('coerce', function () {
it('should return a ref type when a "*" is present', function () {
var type = ref.coerceType('void *')
+ assert(type !== ref.types.void)
assert.equal(type.indirection, ref.types.void.indirection + 1)
})
+ it('should coerce the "type" property of a Buffer', function () {
+ var buf = new Buffer(ref.sizeof.int)
+ buf.type = 'int'
+ var type = ref.getType(buf)
+ assert.strictEqual(ref.types.int, type)
+ assert.strictEqual('int', buf.type)
+ })
+
})
Please sign in to comment.
Something went wrong with that request. Please try again.