Index: test/mjsunit/regress/regress-2470.js |
diff --git a/test/mjsunit/regress/regress-2470.js b/test/mjsunit/regress/regress-2470.js |
index eed381699d66de7f90f6a8ad2ff3ff59213134ab..29a0b250acb2e10919e9a8de8b3b73c57ba3cd7d 100644 |
--- a/test/mjsunit/regress/regress-2470.js |
+++ b/test/mjsunit/regress/regress-2470.js |
@@ -40,3 +40,8 @@ assertThrows('Function("a", "/*", "*/", "/**/");', SyntaxError); |
assertDoesNotThrow('Function("//", "//")'); |
assertDoesNotThrow('Function("//", "//", "//")'); |
assertThrows('Function("a", "//", "//")', SyntaxError); |
+ |
+// Some embedders rely on the string representation of the resulting |
+// function in cases where no formal parameters are specified. |
+var asString = Function("return 23").toString(); |
+assertSame("function anonymous() {\nreturn 23\n}", asString); |