summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test_bjson.js2
-rw-r--r--tests/test_builtin.js3
2 files changed, 5 insertions, 0 deletions
diff --git a/tests/test_bjson.js b/tests/test_bjson.js
index a270796..a90bfe1 100644
--- a/tests/test_bjson.js
+++ b/tests/test_bjson.js
@@ -42,6 +42,7 @@ function isArrayLike(a)
(a instanceof Int8Array) ||
(a instanceof Int16Array) ||
(a instanceof Int32Array) ||
+ (a instanceof Float16Array) ||
(a instanceof Float32Array) ||
(a instanceof Float64Array);
}
@@ -157,6 +158,7 @@ function bjson_test_all()
bjson_test([new Date(1234), new String("abc"), new Number(-12.1), new Boolean(true)]);
bjson_test(new Int32Array([123123, 222111, -32222]));
+ bjson_test(new Float16Array([1024, 1024.5]));
bjson_test(new Float64Array([123123, 222111.5]));
/* tested with a circular reference */
diff --git a/tests/test_builtin.js b/tests/test_builtin.js
index 423841d..667650a 100644
--- a/tests/test_builtin.js
+++ b/tests/test_builtin.js
@@ -489,6 +489,9 @@ function test_typed_array()
a = new Uint16Array(buffer, 2);
a[0] = -1;
+ a = new Float16Array(buffer, 8, 1);
+ a[0] = 1;
+
a = new Float32Array(buffer, 8, 1);
a[0] = 1;