Index: test/cctest/test-api.cc |
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc |
index 9b9f469f60a7a4d434eed5ca7c5003487f0a4fad..3a58929e497d065bbf49dd2f5c0a37749746c342 100644 |
--- a/test/cctest/test-api.cc |
+++ b/test/cctest/test-api.cc |
@@ -12201,6 +12201,25 @@ TEST(RegExp) { |
} |
+THREADED_TEST(EQUALS) { |
+ v8::HandleScope handleScope; |
+ LocalContext localContext; |
+ |
+ v8::Handle<v8::Object> globalProxy = localContext->Global(); |
+ v8::Handle<Value> global = globalProxy->GetPrototype(); |
+ |
+ CHECK_EQ(1, global->StrictEquals(global)); |
Mads Ager (chromium)
2011/02/01 08:36:34
Please use true and false instead of 1 and 0.
antonm
2011/02/01 12:43:12
Sure and should have done it myself.
|
+ CHECK_EQ(0, global->StrictEquals(globalProxy)); |
+ CHECK_EQ(0, globalProxy->StrictEquals(global)); |
+ CHECK_EQ(1, globalProxy->StrictEquals(globalProxy)); |
+ |
+ CHECK_EQ(1, global->Equals(global)); |
+ CHECK_EQ(0, global->Equals(globalProxy)); |
+ CHECK_EQ(0, globalProxy->Equals(global)); |
+ CHECK_EQ(1, globalProxy->Equals(globalProxy)); |
+} |
+ |
+ |
static v8::Handle<v8::Value> Getter(v8::Local<v8::String> property, |
const v8::AccessorInfo& info ) { |
return v8_str("42!"); |