Index: test/webkit/fast/regex/constructor.js |
diff --git a/test/webkit/dfg-add-not-number.js b/test/webkit/fast/regex/constructor.js |
similarity index 86% |
copy from test/webkit/dfg-add-not-number.js |
copy to test/webkit/fast/regex/constructor.js |
index df6dcdf2ef2b3c08e57020a17f9d3992c8ca95d3..9d352452868215d502dd3d2d18cc955d09f9d69f 100644 |
--- a/test/webkit/dfg-add-not-number.js |
+++ b/test/webkit/fast/regex/constructor.js |
@@ -21,15 +21,12 @@ |
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
-description( |
-"Tests that adding things that aren't numbers using ++ does not crash or generate bogus code." |
-); |
+description("This test checks use of the regexp constructor."); |
-function foo(a) { |
- a++; |
- return a; |
-} |
+var re = /abc/; |
-for (var i = 0; i < 100; ++i) |
- shouldBe("foo(\"foo\" + i)", "NaN"); |
+shouldBeTrue("re === RegExp(re)"); |
+shouldBeTrue("re !== new RegExp(re)"); |
+shouldThrow("re === RegExp(re,'i')"); |
+shouldThrow("re !== new RegExp(re,'i')"); |