Permalink
Browse files

Added a test to make sure size_t types are unsigned

  • Loading branch information...
rbranson committed Nov 18, 2010
1 parent 849f04f commit 8f54311253cef4231825e2ec981323693cc99199
Showing with 7 additions and 1 deletion.
  1. +1 −1 README.md
  2. +6 −0 test/test.js
View
@@ -65,7 +65,7 @@ In addition to the basic types, there are type aliases for common C types.
ulong unsigned long
longlong long long
ulonglong unsigned long long
- size_t unsigned int (size is platform-dependent)
+ size_t platform-dependent, usually pointer size
# V8 and 64-bit Types
View
@@ -220,6 +220,12 @@ assert.ok(ptr.getULongLong() != 8 && ptr.getULongLong() > 0);
ptr.putULongLong(17);
assert.equal(17, ptr.getULongLong());
+///////////////////////////////
+
+assert.throws(function() {
+ ptr.putSizeT(-1);
+});
+
ptr.putSizeT(18);
assert.equal(18, ptr.getSizeT());

0 comments on commit 8f54311

Please sign in to comment.