Index: test/cctest/test-api.cc |
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc |
index 19492a53278f5fdb714633a941775f7a94945ab5..dfb8edb2f91ae99ac569fb2fce4a8921302879e1 100644 |
--- a/test/cctest/test-api.cc |
+++ b/test/cctest/test-api.cc |
@@ -202,6 +202,20 @@ THREADED_TEST(ReceiverSignature) { |
} |
+TEST(HasOwnProperty) { |
+ v8::HandleScope scope; |
+ LocalContext env; |
+ Handle<Value> value = CompileRun( |
+ "function Foo() { this.foo = 11; };" |
+ "function Bar() { this.bar = 13; };" |
+ "Bar.prototype = new Foo();" |
+ "new Bar();"); |
+ CHECK(value->IsObject()); |
+ Handle<Object> object = value->ToObject(); |
Vitaly Repeshko
2011/04/27 09:03:59
It'd be interesting to test this with __defineGett
Karl Klose
2011/04/28 08:32:43
Done.
|
+ CHECK_EQ(true, object->Has(v8_str("foo"))); |
+ CHECK_EQ(false, object->HasOwnProperty(v8_str("foo"))); |
+ CHECK_EQ(true, object->HasOwnProperty(v8_str("bar"))); |
+} |
THREADED_TEST(ArgumentSignature) { |