| Index: test/cctest/test-api.cc
|
| diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
|
| index e0bcbc92cfabfcdace40f8c63937d20167879516..a803937ae7f311ecf589e5460709453c05b32d3f 100644
|
| --- a/test/cctest/test-api.cc
|
| +++ b/test/cctest/test-api.cc
|
| @@ -3862,6 +3862,32 @@ THREADED_TEST(UndetectableObject) {
|
| }
|
|
|
|
|
| +THREADED_TEST(VoidLiteral) {
|
| + v8::HandleScope scope;
|
| + LocalContext env;
|
| +
|
| + Local<v8::FunctionTemplate> desc =
|
| + v8::FunctionTemplate::New(0, v8::Handle<Value>());
|
| + desc->InstanceTemplate()->MarkAsUndetectable(); // undetectable
|
| +
|
| + Local<v8::Object> obj = desc->GetFunction()->NewInstance();
|
| + env->Global()->Set(v8_str("undetectable"), obj);
|
| +
|
| + ExpectBoolean("undefined == void 0", true);
|
| + ExpectBoolean("undetectable == void 0", true);
|
| + ExpectBoolean("null == void 0", true);
|
| + ExpectBoolean("undefined === void 0", true);
|
| + ExpectBoolean("undetectable === void 0", false);
|
| + ExpectBoolean("null === void 0", false);
|
| +
|
| + ExpectBoolean("void 0 == undefined", true);
|
| + ExpectBoolean("void 0 == undetectable", true);
|
| + ExpectBoolean("void 0 == null", true);
|
| + ExpectBoolean("void 0 === undefined", true);
|
| + ExpectBoolean("void 0 === undetectable", false);
|
| + ExpectBoolean("void 0 === null", false);
|
| +}
|
| +
|
|
|
| THREADED_TEST(ExtensibleOnUndetectable) {
|
| v8::HandleScope scope;
|
|
|