2015-05-19 19:00:06 +08:00
|
|
|
'use strict';
|
2013-02-22 03:02:33 +08:00
|
|
|
var assert = require('assert');
|
|
|
|
var binding = require('./build/Release/binding');
|
2013-02-22 04:54:13 +08:00
|
|
|
var called = false;
|
|
|
|
|
2015-05-19 19:00:06 +08:00
|
|
|
process.on('exit', function() {
|
2013-02-22 04:54:13 +08:00
|
|
|
assert(called);
|
|
|
|
});
|
|
|
|
|
2015-05-19 19:00:06 +08:00
|
|
|
binding(5, function(err, val) {
|
2013-02-22 03:02:33 +08:00
|
|
|
assert.equal(null, err);
|
|
|
|
assert.equal(10, val);
|
2015-05-19 19:00:06 +08:00
|
|
|
process.nextTick(function() {
|
2013-02-22 04:54:13 +08:00
|
|
|
called = true;
|
|
|
|
});
|
2013-02-22 03:02:33 +08:00
|
|
|
});
|