Index: test/cctest/compiler/test-run-intrinsics.cc |
diff --git a/test/cctest/compiler/test-run-intrinsics.cc b/test/cctest/compiler/test-run-intrinsics.cc |
index 515e096f4474c09000064da856d2b9271c9a8e51..47116ad6743278006e943634f50a5822a24c161c 100644 |
--- a/test/cctest/compiler/test-run-intrinsics.cc |
+++ b/test/cctest/compiler/test-run-intrinsics.cc |
@@ -80,6 +80,21 @@ |
} |
+TEST(IsRegExp) { |
+ FunctionTester T("(function(a) { return %_IsRegExp(a); })", flags); |
+ |
+ T.CheckFalse(T.NewObject("new Date()")); |
+ T.CheckFalse(T.NewObject("(function() {})")); |
+ T.CheckFalse(T.NewObject("([1])")); |
+ T.CheckFalse(T.NewObject("({})")); |
+ T.CheckTrue(T.NewObject("(/x/)")); |
+ T.CheckFalse(T.undefined()); |
+ T.CheckFalse(T.null()); |
+ T.CheckFalse(T.Val("x")); |
+ T.CheckFalse(T.Val(1)); |
+} |
+ |
+ |
TEST(IsSmi) { |
FunctionTester T("(function(a) { return %_IsSmi(a); })", flags); |