[6a3a178] | 1 | var test = require('tape')
|
---|
| 2 | var ista = require('./')
|
---|
| 3 |
|
---|
| 4 | test('strict', function(t) {
|
---|
| 5 | t.ok(ista.strict(new Int8Array), 'Int8Array')
|
---|
| 6 | t.ok(ista.strict(new Int16Array), 'Int16Array')
|
---|
| 7 | t.ok(ista.strict(new Int32Array), 'Int32Array')
|
---|
| 8 | t.ok(ista.strict(new Uint8Array), 'Uint8Array')
|
---|
| 9 | t.ok(ista.strict(new Uint16Array), 'Uint16Array')
|
---|
| 10 | t.ok(ista.strict(new Uint32Array), 'Uint32Array')
|
---|
| 11 | t.ok(ista.strict(new Float32Array), 'Float32Array')
|
---|
| 12 | t.ok(ista.strict(new Float64Array), 'Float64Array')
|
---|
| 13 |
|
---|
| 14 | t.ok(!ista.strict(new Array), 'Array')
|
---|
| 15 | t.ok(!ista.strict([]), '[]')
|
---|
| 16 |
|
---|
| 17 | t.end()
|
---|
| 18 | })
|
---|
| 19 |
|
---|
| 20 | test('loose', function(t) {
|
---|
| 21 | t.ok(ista.loose(new Int8Array), 'Int8Array')
|
---|
| 22 | t.ok(ista.loose(new Int16Array), 'Int16Array')
|
---|
| 23 | t.ok(ista.loose(new Int32Array), 'Int32Array')
|
---|
| 24 | t.ok(ista.loose(new Uint8Array), 'Uint8Array')
|
---|
| 25 | t.ok(ista.loose(new Uint16Array), 'Uint16Array')
|
---|
| 26 | t.ok(ista.loose(new Uint32Array), 'Uint32Array')
|
---|
| 27 | t.ok(ista.loose(new Float32Array), 'Float32Array')
|
---|
| 28 | t.ok(ista.loose(new Float64Array), 'Float64Array')
|
---|
| 29 |
|
---|
| 30 | t.ok(!ista.loose(new Array), 'Array')
|
---|
| 31 | t.ok(!ista.loose([]), '[]')
|
---|
| 32 |
|
---|
| 33 | t.end()
|
---|
| 34 | })
|
---|