Esempio n. 1
0
test('Native Matrix', function(assert) {
  var nativemat = require('../build/' + (!!process.env.NODE_OPENCV_DEBUG ? 'Debug' : 'Release') + '/test_nativemat.node');
  var mat = new cv.Matrix(42, 8);

  assert.deepEqual(mat.size(), nativemat.size(mat), 'nativemat');
  assert.end();
})
Esempio n. 2
0
			it('should take a hash object of tasks', function () {
				var registry;

				registry = new ConfigurableRecipeRegistry({
					task: function () {}
				});
				expect(registry).to.be.instanceof(ConfigurableRecipeRegistry);
				expect(registry.size()).to.equal(1);
			});
Esempio n. 3
0
File: utils.js Progetto: 29n/pomelo
    it('should return the own property count of the object', function() {
      var obj = {
        p1: 'str',
        p2: 1,
        m1: function() {}
      };

      utils.size(obj).should.equal(2);
    });
Esempio n. 4
0
 it("key size should match that of sodium", function (done) {
     var key = new Key();
     key.size().should.eql(sizeBuffer);
     done();
 });
m.aio.devicemanager.DeviceManager.prototype.deleteUnlicensed=function(a,c){for(var b=null,d=this,e=0;e<this.handlers.length;e++){var f=this.handlers[e];if(f.tenant&&f.tenant.index==a){b=f;break}}b?m.aio.devicemanager._configmanager.trace("config/tenants/"+a,function(a,e){if(a)c&&c(a);else if(e.isAccessible()){var f=e.getRemotes();f&&0!=f.size()?(f=f.getChildren(),b.deleteUnlicensed(function(a,b){a?c&&c(a):f&&0!=f.length?require("async").each(f,function(a,c){d.saveRemoteWithDB(a,b,function(a){c(a)})},
function(a){c&&c(a)}):c&&c()})):c&&c(null)}else c&&c(Error("not permitted"))}):c(Error("no such tenant"))};m.aio.devicemanager.DeviceManager.prototype.getDeviceDBForRemote=function(a,c){for(var b=null,d=0;d<this.handlers.length;d++){var e=this.handlers[d];if(e.tenant&&e.tenant.index==a){b=e;break}}b?m.aio.devicemanager._configmanager.trace("config/tenants/"+a,function(a,d){a?c&&c(a):d.isAccessible()?b.deleteUnlicensed(function(a,b){c&&c(a,b)}):c&&c(Error("not permitted"))}):c(Error("no such tenant"))};