Allow SIMD vector unit to be toggled on/off #172

Currently defaults to off but future versions may default to on
This commit is contained in:
Lovell Fuller
2015-12-12 09:11:50 +00:00
parent 95cf35efc5
commit 32c4b9eff1
12 changed files with 107 additions and 10 deletions

View File

@@ -51,6 +51,21 @@ describe('Utilities', function() {
});
});
describe('SIMD', function() {
it('Can get current state', function() {
var simd = sharp.simd();
assert.strictEqual(typeof simd, 'boolean');
});
it('Can disable', function() {
var simd = sharp.simd(false);
assert.strictEqual(simd, false);
});
it('Can attempt to enable', function() {
var simd = sharp.simd(true);
assert.strictEqual(typeof simd, 'boolean');
});
});
describe('Format', function() {
it('Contains expected attributes', function() {
assert.strictEqual('object', typeof sharp.format);