Comparing version 0.0.5 to 0.0.6
@@ -7,3 +7,4 @@ { | ||
"nbind.gypi" | ||
] | ||
], | ||
"resolver": "gypiresolver.js" | ||
} |
{ | ||
"name": "nbind", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "Embind-style bindings generator for Node.js", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/charto/nbind", |
@@ -7,18 +7,38 @@ var test = require('tap').test; | ||
var Prim = testModule.PrimitiveMethods; | ||
var prim = new Prim(); | ||
test('Methods and primitive types', function(t) { | ||
t.strictEqual(Prim.negateStatic(false), true); | ||
t.strictEqual(prim.negate(false), true); | ||
var Type = testModule.PrimitiveMethods; | ||
var obj = new Type(); | ||
t.strictEqual(Prim.incrementIntStatic(1), 2); | ||
t.strictEqual(prim.incrementInt(1), 2); | ||
t.strictEqual(Type.negateStatic(false), true); | ||
t.strictEqual(obj.negate(false), true); | ||
t.type(Prim.incrementStateStatic(), 'undefined'); | ||
t.strictEqual(Prim.getStateStatic(), 1); | ||
t.type(prim.incrementState(), 'undefined'); | ||
t.strictEqual(prim.getState(), 2); | ||
t.strictEqual(Type.incrementIntStatic(1), 2); | ||
t.strictEqual(obj.incrementInt(1), 2); | ||
t.type(Type.incrementStateStatic(), 'undefined'); | ||
t.strictEqual(Type.getStateStatic(), 1); | ||
t.type(obj.incrementState(), 'undefined'); | ||
t.strictEqual(obj.getState(), 2); | ||
t.strictEqual(Type.strLengthStatic('foo'), 3); | ||
t.strictEqual(obj.strLength('foobar'), 6); | ||
t.end(); | ||
}); | ||
test('Getters and setters', function(t) { | ||
var Type = testModule.GetterSetter; | ||
var obj = new Type(); | ||
t.strictEqual(obj.x, 1); | ||
t.strictEqual(obj.y, 2); | ||
t.strictEqual(obj.z, 3); | ||
obj.y = 4; | ||
obj.z = 5; | ||
t.strictEqual(obj.y, 4); | ||
t.strictEqual(obj.z, 5); | ||
t.end(); | ||
}); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
54236
28
53