| Index: test/cctest/interpreter/test-interpreter-intrinsics.cc
|
| diff --git a/test/cctest/interpreter/test-interpreter-intrinsics.cc b/test/cctest/interpreter/test-interpreter-intrinsics.cc
|
| index 7b3d0d16fec3125f111fc075361a639fbe21bfdf..7862461084ca8cafec9df87a1aac6b80ffdda550 100644
|
| --- a/test/cctest/interpreter/test-interpreter-intrinsics.cc
|
| +++ b/test/cctest/interpreter/test-interpreter-intrinsics.cc
|
| @@ -267,6 +267,27 @@ TEST(ValueOf) {
|
| ->SameValue(*helper.NewObject("'foobar'")));
|
| }
|
|
|
| +TEST(ClassOf) {
|
| + HandleAndZoneScope handles;
|
| + Isolate* isolate = handles.main_isolate();
|
| + Factory* factory = isolate->factory();
|
| + InvokeIntrinsicHelper helper(handles.main_isolate(), handles.main_zone(),
|
| + Runtime::kInlineClassOf);
|
| + CHECK_EQ(*helper.Invoke(helper.NewObject("123")), *factory->null_value());
|
| + CHECK_EQ(*helper.Invoke(helper.NewObject("'true'")), *factory->null_value());
|
| + CHECK_EQ(*helper.Invoke(helper.NewObject("'foo'")), *factory->null_value());
|
| + CHECK(helper.Invoke(helper.NewObject("({a:1})"))
|
| + ->SameValue(*helper.NewObject("'Object'")));
|
| + CHECK(helper.Invoke(helper.NewObject("(function foo() {})"))
|
| + ->SameValue(*helper.NewObject("'Function'")));
|
| + CHECK(helper.Invoke(helper.NewObject("new Date()"))
|
| + ->SameValue(*helper.NewObject("'Date'")));
|
| + CHECK(helper.Invoke(helper.NewObject("new Set"))
|
| + ->SameValue(*helper.NewObject("'Set'")));
|
| + CHECK(helper.Invoke(helper.NewObject("/x/"))
|
| + ->SameValue(*helper.NewObject("'RegExp'")));
|
| +}
|
| +
|
| } // namespace interpreter
|
| } // namespace internal
|
| } // namespace v8
|
|
|