Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1109)

Side by Side Diff: test/webkit/regexp-compile.js

Issue 1448933002: Introduce a BuiltinsConstructStub that sets up new.target and does a [[call]] per ES6 9.3.2 (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 2 // Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions 5 // modification, are permitted provided that the following conditions
6 // are met: 6 // are met:
7 // 1. Redistributions of source code must retain the above copyright 7 // 1. Redistributions of source code must retain the above copyright
8 // notice, this list of conditions and the following disclaimer. 8 // notice, this list of conditions and the following disclaimer.
9 // 2. Redistributions in binary form must reproduce the above copyright 9 // 2. Redistributions in binary form must reproduce the above copyright
10 // notice, this list of conditions and the following disclaimer in the 10 // notice, this list of conditions and the following disclaimer in the
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 48
49 shouldThrow("re.compile(new RegExp('c'), 'i');"); 49 shouldThrow("re.compile(new RegExp('c'), 'i');");
50 50
51 // It's OK to supply a second argument, as long as the argument is "undefined". 51 // It's OK to supply a second argument, as long as the argument is "undefined".
52 re.compile(re, undefined); 52 re.compile(re, undefined);
53 shouldBe("re.toString()", "'/c/i'"); 53 shouldBe("re.toString()", "'/c/i'");
54 54
55 shouldThrow("re.compile(new RegExp('+'));"); 55 shouldThrow("re.compile(new RegExp('+'));");
56 56
57 re.compile(undefined); 57 re.compile(undefined);
58 shouldBe("re.toString()", "'/undefined/'"); 58 shouldBe("re.toString()", "'/(?:)/'");
59 59
60 re.compile(null); 60 re.compile(null);
61 shouldBe("re.toString()", "'/null/'"); 61 shouldBe("re.toString()", "'/null/'");
62 62
63 re.compile(); 63 re.compile();
64 shouldBe("re.toString()", "'/(?:)/'"); 64 shouldBe("re.toString()", "'/(?:)/'");
65 65
66 re.compile("z", undefined); 66 re.compile("z", undefined);
67 shouldBe("re.toString()", "'/z/'"); 67 shouldBe("re.toString()", "'/z/'");
68 68
69 // Compiling should reset lastIndex. 69 // Compiling should reset lastIndex.
70 re.lastIndex = 100; 70 re.lastIndex = 100;
71 re.compile(/a/g); 71 re.compile(/a/g);
72 shouldBe("re.lastIndex", "0"); 72 shouldBe("re.lastIndex", "0");
73 re.exec("aaa"); 73 re.exec("aaa");
74 shouldBe("re.lastIndex", "1"); 74 shouldBe("re.lastIndex", "1");
OLDNEW
« no previous file with comments | « test/webkit/fast/regex/constructor-expected.txt ('k') | test/webkit/regexp-compile-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698