summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/built-ins/Object/values/primitive-numbers.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/tests/test262/built-ins/Object/values/primitive-numbers.js')
-rw-r--r--js/src/tests/test262/built-ins/Object/values/primitive-numbers.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/js/src/tests/test262/built-ins/Object/values/primitive-numbers.js b/js/src/tests/test262/built-ins/Object/values/primitive-numbers.js
new file mode 100644
index 0000000000..2ed4fe4758
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Object/values/primitive-numbers.js
@@ -0,0 +1,17 @@
+// Copyright (C) 2015 Jordan Harband. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-object.values
+description: Object.values accepts number primitives.
+author: Jordan Harband
+---*/
+
+assert.sameValue(Object.values(0).length, 0, '0 has zero values');
+assert.sameValue(Object.values(-0).length, 0, '-0 has zero values');
+assert.sameValue(Object.values(Infinity).length, 0, 'Infinity has zero values');
+assert.sameValue(Object.values(-Infinity).length, 0, '-Infinity has zero values');
+assert.sameValue(Object.values(NaN).length, 0, 'NaN has zero values');
+assert.sameValue(Object.values(Math.PI).length, 0, 'Math.PI has zero values');
+
+reportCompare(0, 0);