summaryrefslogtreecommitdiff
path: root/test/built-ins/Object
diff options
context:
space:
mode:
authorRick Waldron <waldron.rick@gmail.com>2015-04-16 14:33:25 -0400
committerRick Waldron <waldron.rick@gmail.com>2015-04-21 14:25:53 -0400
commitb3cbeaacb7f3175d43faa560fb41bc852ad4c19b (patch)
tree506076a48d075528e7ba23f5aca93e4c0a0f79ff /test/built-ins/Object
parente9593a3d650e7d9c2f344bdf2f5e373dbcf3ade3 (diff)
downloadqtdeclarative-testsuites-b3cbeaacb7f3175d43faa560fb41bc852ad4c19b.tar.gz
19.1.2.10 Object.is
7.2.9 SameValue(x, y)
Diffstat (limited to 'test/built-ins/Object')
-rw-r--r--test/built-ins/Object/is/length.js18
-rw-r--r--test/built-ins/Object/is/name.js18
-rw-r--r--test/built-ins/Object/is/not-same-value-x-y-boolean.js30
-rw-r--r--test/built-ins/Object/is/not-same-value-x-y-null.js20
-rw-r--r--test/built-ins/Object/is/not-same-value-x-y-number.js21
-rw-r--r--test/built-ins/Object/is/not-same-value-x-y-object.js32
-rw-r--r--test/built-ins/Object/is/not-same-value-x-y-string.js27
-rw-r--r--test/built-ins/Object/is/not-same-value-x-y-symbol.js24
-rw-r--r--test/built-ins/Object/is/not-same-value-x-y-type.js69
-rw-r--r--test/built-ins/Object/is/not-same-value-x-y-undefined.js16
-rw-r--r--test/built-ins/Object/is/object-is.js19
-rw-r--r--test/built-ins/Object/is/same-value-x-y-boolean.js17
-rw-r--r--test/built-ins/Object/is/same-value-x-y-empty.js16
-rw-r--r--test/built-ins/Object/is/same-value-x-y-null.js19
-rw-r--r--test/built-ins/Object/is/same-value-x-y-number.js21
-rw-r--r--test/built-ins/Object/is/same-value-x-y-object.js24
-rw-r--r--test/built-ins/Object/is/same-value-x-y-string.js28
-rw-r--r--test/built-ins/Object/is/same-value-x-y-symbol.js19
-rw-r--r--test/built-ins/Object/is/same-value-x-y-undefined.js17
19 files changed, 455 insertions, 0 deletions
diff --git a/test/built-ins/Object/is/length.js b/test/built-ins/Object/is/length.js
new file mode 100644
index 000000000..c10951137
--- /dev/null
+++ b/test/built-ins/Object/is/length.js
@@ -0,0 +1,18 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+es6id: 19.1.2.10
+description: >
+ Object.is ( value1, value2 )
+
+ 17 ECMAScript Standard Built-in Objects
+
+includes: [propertyHelper.js]
+---*/
+
+assert.sameValue(Object.is.length, 2, "The value of `Object.is.length` is `2`");
+
+verifyNotEnumerable(Object.is, "length");
+verifyConfigurable(Object.is, "length");
+verifyNotWritable(Object.is, "length");
+
diff --git a/test/built-ins/Object/is/name.js b/test/built-ins/Object/is/name.js
new file mode 100644
index 000000000..da73e1a4b
--- /dev/null
+++ b/test/built-ins/Object/is/name.js
@@ -0,0 +1,18 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+es6id: 19.1.2.10
+description: >
+ Object.is ( value1, value2 )
+
+ 17 ECMAScript Standard Built-in Objects
+
+includes: [propertyHelper.js]
+---*/
+
+assert.sameValue(Object.is.name, 'is', "The value of `Object.is.name` is `'is'`");
+
+verifyNotEnumerable(Object.is, "name");
+verifyNotWritable(Object.is, "name");
+verifyConfigurable(Object.is, "name");
+
diff --git a/test/built-ins/Object/is/not-same-value-x-y-boolean.js b/test/built-ins/Object/is/not-same-value-x-y-boolean.js
new file mode 100644
index 000000000..35a06caa2
--- /dev/null
+++ b/test/built-ins/Object/is/not-same-value-x-y-boolean.js
@@ -0,0 +1,30 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+es6id: 19.1.2.10
+description: >
+ Object.is ( value1, value2 )
+
+ 7.2.9 SameValue(x, y)
+
+ ...
+ 8. If Type(x) is Boolean, then
+ a. If x and y are both true or both false,
+ return true; otherwise, return false.
+---*/
+
+assert.sameValue(Object.is(true, false), false, "`Object.is(true, false)` returns `false`");
+assert.sameValue(Object.is(false, true), false, "`Object.is(false, true)` returns `false`");
+assert.sameValue(Object.is(true, 1), false, "`Object.is(true, 1)` returns `false`");
+assert.sameValue(Object.is(false, 0), false, "`Object.is(false, 0)` returns `false`");
+assert.sameValue(Object.is(true, {}), false, "`Object.is(true, {})` returns `false`");
+assert.sameValue(Object.is(true, undefined), false, "`Object.is(true, undefined)` returns `false`");
+assert.sameValue(Object.is(false, undefined), false, "`Object.is(false, undefined)` returns `false`");
+assert.sameValue(Object.is(true, null), false, "`Object.is(true, null)` returns `false`");
+assert.sameValue(Object.is(false, null), false, "`Object.is(false, null)` returns `false`");
+assert.sameValue(Object.is(true, NaN), false, "`Object.is(true, NaN)` returns `false`");
+assert.sameValue(Object.is(false, NaN), false, "`Object.is(false, NaN)` returns `false`");
+assert.sameValue(Object.is(true, ''), false, "`Object.is(true, '')` returns `false`");
+assert.sameValue(Object.is(false, ''), false, "`Object.is(false, '')` returns `false`");
+assert.sameValue(Object.is(true, []), false, "`Object.is(true, [])` returns `false`");
+assert.sameValue(Object.is(false, []), false, "`Object.is(false, [])` returns `false`");
diff --git a/test/built-ins/Object/is/not-same-value-x-y-null.js b/test/built-ins/Object/is/not-same-value-x-y-null.js
new file mode 100644
index 000000000..c364bc11b
--- /dev/null
+++ b/test/built-ins/Object/is/not-same-value-x-y-null.js
@@ -0,0 +1,20 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+es6id: 19.1.2.10
+description: >
+ Object.is ( value1, value2 )
+
+ 7.2.9 SameValue(x, y)
+
+ ...
+ 3. If Type(x) is different from Type(y), return false.
+ ...
+ 5. If Type(x) is Null, return true.
+ ...
+
+---*/
+
+assert.sameValue(Object.is(null), false, "`Object.is(null)` returns `false`");
+assert.sameValue(Object.is(null, undefined), false, "`Object.is(null, undefined)` returns `false`");
+
diff --git a/test/built-ins/Object/is/not-same-value-x-y-number.js b/test/built-ins/Object/is/not-same-value-x-y-number.js
new file mode 100644
index 000000000..ed1ea317c
--- /dev/null
+++ b/test/built-ins/Object/is/not-same-value-x-y-number.js
@@ -0,0 +1,21 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+es6id: 19.1.2.10
+description: >
+ Object.is ( value1, value2 )
+
+ ...
+ 6. If Type(x) is Number, then
+ a. If x is NaN and y is NaN, return true.
+ b. If x is +0 and y is -0, return false.
+ c. If x is -0 and y is +0, return false.
+ d. If x is the same Number value as y, return true.
+ e. Return false.
+ ...
+---*/
+
+assert.sameValue(Object.is(+0, -0), false, "`Object.is(+0, -0)` returns `false`");
+assert.sameValue(Object.is(-0, +0), false, "`Object.is(-0, +0)` returns `false`");
+assert.sameValue(Object.is(0), false, "`Object.is(0)` returns `false`");
+assert.sameValue(Object.is(Infinity, -Infinity), false, "`Object.is(Infinity, -Infinity)` returns `false`");
diff --git a/test/built-ins/Object/is/not-same-value-x-y-object.js b/test/built-ins/Object/is/not-same-value-x-y-object.js
new file mode 100644
index 000000000..7ec854c37
--- /dev/null
+++ b/test/built-ins/Object/is/not-same-value-x-y-object.js
@@ -0,0 +1,32 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+es6id: 19.1.2.10
+description: >
+ Object.is ( value1, value2 )
+
+ ...
+ 10. Return true if x and y are the same Object value. Otherwise, return false.
+---*/
+
+assert.sameValue(Object.is({}, {}), false, "`Object.is({}, {})` returns `false`");
+assert.sameValue(
+ Object.is(Object(), Object()),
+ false,
+ "`Object.is(Object(), Object())` returns `false`"
+);
+assert.sameValue(
+ Object.is(new Object(), new Object()),
+ false,
+ "`Object.is(new Object(), new Object())` returns `false`"
+);
+assert.sameValue(
+ Object.is(Object(0), Object(0)),
+ false,
+ "`Object.is(Object(0), Object(0))` returns `false`"
+);
+assert.sameValue(
+ Object.is(new Object(''), new Object('')),
+ false,
+ "`Object.is(new Object(''), new Object(''))` returns `false`"
+);
diff --git a/test/built-ins/Object/is/not-same-value-x-y-string.js b/test/built-ins/Object/is/not-same-value-x-y-string.js
new file mode 100644
index 000000000..6def9622d
--- /dev/null
+++ b/test/built-ins/Object/is/not-same-value-x-y-string.js
@@ -0,0 +1,27 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+es6id: 19.1.2.10
+description: >
+ Object.is ( value1, value2 )
+
+ 7.2.9 SameValue(x, y)
+
+ ...
+ 7. If Type(x) is String, then
+ a. If x and y are exactly the same sequence of code units
+ (same length and same code units at corresponding indices)
+ return true; otherwise, return false.
+ ...
+---*/
+
+assert.sameValue(Object.is('', true), false, "`Object.is('', true)` returns `false`");
+assert.sameValue(Object.is('', 0), false, "`Object.is('', 0)` returns `false`");
+assert.sameValue(Object.is('', {}), false, "`Object.is('', {})` returns `false`");
+assert.sameValue(
+ Object.is('', undefined),
+ false,
+ "`Object.is('', undefined)` returns `false`"
+);
+assert.sameValue(Object.is('', null), false, "`Object.is('', null)` returns `false`");
+assert.sameValue(Object.is('', NaN), false, "`Object.is('', NaN)` returns `false`");
diff --git a/test/built-ins/Object/is/not-same-value-x-y-symbol.js b/test/built-ins/Object/is/not-same-value-x-y-symbol.js
new file mode 100644
index 000000000..4f17e77a8
--- /dev/null
+++ b/test/built-ins/Object/is/not-same-value-x-y-symbol.js
@@ -0,0 +1,24 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+es6id: 19.1.2.10
+description: >
+ Object.is ( value1, value2 )
+
+ ...
+ 6. If Type(x) is Symbol, then
+ a. If x and y are both the same Symbol value,
+ return true; otherwise, return false.
+ ...
+---*/
+
+assert.sameValue(
+ Object.is(Symbol(), Symbol()),
+ false,
+ "`Object.is(Symbol(), Symbol())` returns `false`"
+);
+assert.sameValue(
+ Object.is(Symbol('description'), Symbol('description')),
+ false,
+ "`Object.is(Symbol('description'), Symbol('description'))` returns `false`"
+);
diff --git a/test/built-ins/Object/is/not-same-value-x-y-type.js b/test/built-ins/Object/is/not-same-value-x-y-type.js
new file mode 100644
index 000000000..203f6d061
--- /dev/null
+++ b/test/built-ins/Object/is/not-same-value-x-y-type.js
@@ -0,0 +1,69 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+es6id: 19.1.2.10
+description: >
+ Object.is ( value1, value2 )
+
+ 7.2.9 SameValue(x, y)
+
+ ...
+ 3. If Type(x) is different from Type(y), return false.
+ ...
+
+---*/
+
+var a = {};
+
+assert.sameValue(Object.is(a, true), false, "`Object.is(a, true)` returns `false`");
+assert.sameValue(Object.is(a, ''), false, "`Object.is(a, '')` returns `false`");
+assert.sameValue(Object.is(a, 0), false, "`Object.is(a, 0)` returns `false`");
+assert.sameValue(
+ Object.is(a, undefined),
+ false,
+ "`Object.is(a, undefined)` returns `false`"
+);
+
+assert.sameValue(Object.is(NaN, true), false, "`Object.is(NaN, true)` returns `false`");
+assert.sameValue(Object.is(NaN, ''), false, "`Object.is(NaN, '')` returns `false`");
+assert.sameValue(Object.is(NaN, a), false, "`Object.is(NaN, a)` returns `false`");
+assert.sameValue(
+ Object.is(NaN, undefined),
+ false,
+ "`Object.is(NaN, undefined)` returns `false`"
+);
+assert.sameValue(Object.is(NaN, null), false, "`Object.is(NaN, null)` returns `false`");
+
+assert.sameValue(Object.is(true, 0), false, "`Object.is(true, 0)` returns `false`");
+assert.sameValue(Object.is(true, a), false, "`Object.is(true, a)` returns `false`");
+assert.sameValue(
+ Object.is(true, undefined),
+ false,
+ "`Object.is(true, undefined)` returns `false`"
+);
+assert.sameValue(Object.is(true, null), false, "`Object.is(true, null)` returns `false`");
+assert.sameValue(Object.is(true, NaN), false, "`Object.is(true, NaN)` returns `false`");
+assert.sameValue(Object.is(true, ''), false, "`Object.is(true, '')` returns `false`");
+
+assert.sameValue(Object.is(false, 0), false, "`Object.is(false, 0)` returns `false`");
+assert.sameValue(Object.is(false, a), false, "`Object.is(false, a)` returns `false`");
+assert.sameValue(
+ Object.is(false, undefined),
+ false,
+ "`Object.is(false, undefined)` returns `false`"
+);
+assert.sameValue(Object.is(false, null), false, "`Object.is(false, null)` returns `false`");
+assert.sameValue(Object.is(false, NaN), false, "`Object.is(false, NaN)` returns `false`");
+assert.sameValue(Object.is(false, ''), false, "`Object.is(false, '')` returns `false`");
+
+assert.sameValue(Object.is(0, true), false, "`Object.is(0, true)` returns `false`");
+assert.sameValue(Object.is(0, a), false, "`Object.is(0, a)` returns `false`");
+assert.sameValue(
+ Object.is(0, undefined),
+ false,
+ "`Object.is(0, undefined)` returns `false`"
+);
+assert.sameValue(Object.is(0, null), false, "`Object.is(0, null)` returns `false`");
+assert.sameValue(Object.is(0, NaN), false, "`Object.is(0, NaN)` returns `false`");
+assert.sameValue(Object.is(0, ''), false, "`Object.is(0, '')` returns `false`");
+
diff --git a/test/built-ins/Object/is/not-same-value-x-y-undefined.js b/test/built-ins/Object/is/not-same-value-x-y-undefined.js
new file mode 100644
index 000000000..73fdd19f0
--- /dev/null
+++ b/test/built-ins/Object/is/not-same-value-x-y-undefined.js
@@ -0,0 +1,16 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+es6id: 19.1.2.10
+description: >
+ Object.is ( value1, value2 )
+
+ 7.2.9 SameValue(x, y)
+
+ ...
+ 4. If Type(x) is Undefined, return true.
+ ...
+
+---*/
+
+assert.sameValue(Object.is(undefined, null), false, "`Object.is(undefined, null)` returns `false`");
diff --git a/test/built-ins/Object/is/object-is.js b/test/built-ins/Object/is/object-is.js
new file mode 100644
index 000000000..1a83df6c4
--- /dev/null
+++ b/test/built-ins/Object/is/object-is.js
@@ -0,0 +1,19 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+es6id: 19.1.2.10
+description: >
+ Object.is ( value1, value2 )
+
+ 17 ECMAScript Standard Built-in Objects
+
+includes: [propertyHelper.js]
+---*/
+
+
+assert.sameValue(typeof Object.is, "function");
+assert.sameValue(Object.is.name, "is");
+
+verifyWritable(Object, "is");
+verifyNotEnumerable(Object, "is");
+verifyConfigurable(Object, "is");
diff --git a/test/built-ins/Object/is/same-value-x-y-boolean.js b/test/built-ins/Object/is/same-value-x-y-boolean.js
new file mode 100644
index 000000000..860033864
--- /dev/null
+++ b/test/built-ins/Object/is/same-value-x-y-boolean.js
@@ -0,0 +1,17 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+es6id: 19.1.2.10
+description: >
+ Object.is ( value1, value2 )
+
+ 7.2.9 SameValue(x, y)
+
+ ...
+ 8. If Type(x) is Boolean, then
+ a. If x and y are both true or both false,
+ return true; otherwise, return false.
+---*/
+
+assert.sameValue(Object.is(true, true), true, "`Object.is(true, true)` returns `true`");
+assert.sameValue(Object.is(false, false), true, "`Object.is(false, false)` returns `true`");
diff --git a/test/built-ins/Object/is/same-value-x-y-empty.js b/test/built-ins/Object/is/same-value-x-y-empty.js
new file mode 100644
index 000000000..63e37f750
--- /dev/null
+++ b/test/built-ins/Object/is/same-value-x-y-empty.js
@@ -0,0 +1,16 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+es6id: 19.1.2.10
+description: >
+ Object.is ( value1, value2 )
+
+ 7.2.9 SameValue(x, y)
+
+ ...
+ 4. If Type(x) is Undefined, return true.
+ ...
+
+---*/
+
+assert.sameValue(Object.is(), true, "`Object.is()` returns `true`");
diff --git a/test/built-ins/Object/is/same-value-x-y-null.js b/test/built-ins/Object/is/same-value-x-y-null.js
new file mode 100644
index 000000000..cd770d098
--- /dev/null
+++ b/test/built-ins/Object/is/same-value-x-y-null.js
@@ -0,0 +1,19 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+es6id: 19.1.2.10
+description: >
+ Object.is ( value1, value2 )
+
+ 7.2.9 SameValue(x, y)
+
+ ...
+ 3. If Type(x) is different from Type(y), return false.
+ ...
+ 5. If Type(x) is Null, return true.
+ ...
+
+---*/
+
+assert.sameValue(Object.is(null, null), true, "`Object.is(null, null)` returns `true`");
+
diff --git a/test/built-ins/Object/is/same-value-x-y-number.js b/test/built-ins/Object/is/same-value-x-y-number.js
new file mode 100644
index 000000000..5c59ce9e8
--- /dev/null
+++ b/test/built-ins/Object/is/same-value-x-y-number.js
@@ -0,0 +1,21 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+es6id: 19.1.2.10
+description: >
+ Object.is ( value1, value2 )
+
+ ...
+ 6. If Type(x) is Number, then
+ a. If x is NaN and y is NaN, return true.
+ b. If x is +0 and y is -0, return false.
+ c. If x is -0 and y is +0, return false.
+ d. If x is the same Number value as y, return true.
+ e. Return false.
+ ...
+---*/
+
+assert.sameValue(Object.is(NaN, NaN), true, "`Object.is(NaN, NaN)` returns `true`");
+assert.sameValue(Object.is(-0, -0), true, "`Object.is(-0, -0)` returns `true`");
+assert.sameValue(Object.is(+0, +0), true, "`Object.is(+0, +0)` returns `true`");
+assert.sameValue(Object.is(0, 0), true, "`Object.is(0, 0)` returns `true`");
diff --git a/test/built-ins/Object/is/same-value-x-y-object.js b/test/built-ins/Object/is/same-value-x-y-object.js
new file mode 100644
index 000000000..c405e4c35
--- /dev/null
+++ b/test/built-ins/Object/is/same-value-x-y-object.js
@@ -0,0 +1,24 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+es6id: 19.1.2.10
+description: >
+ Object.is ( value1, value2 )
+
+ ...
+ 10. Return true if x and y are the same Object value. Otherwise, return false.
+---*/
+
+var a = {};
+var b = Object(0);
+var c = new Object("");
+var d = [];
+var e = Array();
+var f = new Array();
+
+assert.sameValue(Object.is(a, a), true, "`Object.is(a, a)` returns `true`");
+assert.sameValue(Object.is(b, b), true, "`Object.is(b, b)` returns `true`");
+assert.sameValue(Object.is(c, c), true, "`Object.is(c, c)` returns `true`");
+assert.sameValue(Object.is(d, d), true, "`Object.is(d, d)` returns `true`");
+assert.sameValue(Object.is(e, e), true, "`Object.is(e, e)` returns `true`");
+assert.sameValue(Object.is(f, f), true, "`Object.is(f, f)` returns `true`");
diff --git a/test/built-ins/Object/is/same-value-x-y-string.js b/test/built-ins/Object/is/same-value-x-y-string.js
new file mode 100644
index 000000000..e7a7ec3f9
--- /dev/null
+++ b/test/built-ins/Object/is/same-value-x-y-string.js
@@ -0,0 +1,28 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+es6id: 19.1.2.10
+description: >
+ Object.is ( value1, value2 )
+
+ 7.2.9 SameValue(x, y)
+
+ ...
+ 7. If Type(x) is String, then
+ a. If x and y are exactly the same sequence of code units
+ (same length and same code units at corresponding indices)
+ return true; otherwise, return false.
+ ...
+---*/
+
+assert.sameValue(Object.is('', ''), true, "`Object.is('', '')` returns `true`");
+assert.sameValue(
+ Object.is('foo', 'foo'),
+ true,
+ "`Object.is('foo', 'foo')` returns `true`"
+);
+assert.sameValue(
+ Object.is(String('foo'), String('foo')),
+ true,
+ "`Object.is(String('foo'), String('foo'))` returns `true`"
+);
diff --git a/test/built-ins/Object/is/same-value-x-y-symbol.js b/test/built-ins/Object/is/same-value-x-y-symbol.js
new file mode 100644
index 000000000..9e6b206f7
--- /dev/null
+++ b/test/built-ins/Object/is/same-value-x-y-symbol.js
@@ -0,0 +1,19 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+es6id: 19.1.2.10
+description: >
+ Object.is ( value1, value2 )
+
+ ...
+ 6. If Type(x) is Symbol, then
+ a. If x and y are both the same Symbol value,
+ return true; otherwise, return false.
+ ...
+---*/
+
+var a = Symbol();
+var b = Symbol("description");
+
+assert.sameValue(Object.is(a, a), true, "`Object.is(a, a)` returns `true`");
+assert.sameValue(Object.is(b, b), true, "`Object.is(b, b)` returns `true`");
diff --git a/test/built-ins/Object/is/same-value-x-y-undefined.js b/test/built-ins/Object/is/same-value-x-y-undefined.js
new file mode 100644
index 000000000..9b01cc045
--- /dev/null
+++ b/test/built-ins/Object/is/same-value-x-y-undefined.js
@@ -0,0 +1,17 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+es6id: 19.1.2.10
+description: >
+ Object.is ( value1, value2 )
+
+ 7.2.9 SameValue(x, y)
+
+ ...
+ 4. If Type(x) is Undefined, return true.
+ ...
+
+---*/
+
+assert.sameValue(Object.is(undefined, undefined), true, "`Object.is(undefined, undefined)` returns `true`");
+assert.sameValue(Object.is(undefined), true, "`Object.is(undefined)` returns `true`");