]> gerrit.simantics Code Review - simantics/district.git/blobdiff - org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/node_modules/request/node_modules/is-typedarray/test.js
Adding integrated tile server
[simantics/district.git] / org.simantics.maps.server / node / node-v4.8.0-win-x64 / node_modules / npm / node_modules / request / node_modules / is-typedarray / test.js
diff --git a/org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/node_modules/request/node_modules/is-typedarray/test.js b/org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/node_modules/request/node_modules/is-typedarray/test.js
new file mode 100644 (file)
index 0000000..b0c176f
--- /dev/null
@@ -0,0 +1,34 @@
+var test = require('tape')
+var ista = require('./')
+
+test('strict', function(t) {
+  t.ok(ista.strict(new Int8Array), 'Int8Array')
+  t.ok(ista.strict(new Int16Array), 'Int16Array')
+  t.ok(ista.strict(new Int32Array), 'Int32Array')
+  t.ok(ista.strict(new Uint8Array), 'Uint8Array')
+  t.ok(ista.strict(new Uint16Array), 'Uint16Array')
+  t.ok(ista.strict(new Uint32Array), 'Uint32Array')
+  t.ok(ista.strict(new Float32Array), 'Float32Array')
+  t.ok(ista.strict(new Float64Array), 'Float64Array')
+
+  t.ok(!ista.strict(new Array), 'Array')
+  t.ok(!ista.strict([]), '[]')
+
+  t.end()
+})
+
+test('loose', function(t) {
+  t.ok(ista.loose(new Int8Array), 'Int8Array')
+  t.ok(ista.loose(new Int16Array), 'Int16Array')
+  t.ok(ista.loose(new Int32Array), 'Int32Array')
+  t.ok(ista.loose(new Uint8Array), 'Uint8Array')
+  t.ok(ista.loose(new Uint16Array), 'Uint16Array')
+  t.ok(ista.loose(new Uint32Array), 'Uint32Array')
+  t.ok(ista.loose(new Float32Array), 'Float32Array')
+  t.ok(ista.loose(new Float64Array), 'Float64Array')
+
+  t.ok(!ista.loose(new Array), 'Array')
+  t.ok(!ista.loose([]), '[]')
+
+  t.end()
+})