Commit 008405f0 authored by dslomov's avatar dslomov Committed by Commit bot

Pass --noharmony-scoping to tests validating that we throw on 'const' in strict mode.

R=marja@chromium.org
BUG=v8:2198
LOG=N

Review URL: https://codereview.chromium.org/784323002

Cr-Commit-Position: refs/heads/master@{#25733}
parent 6751f043
......@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --turbo-deoptimization
// Flags: --turbo-deoptimization --noharmony-scoping
function CheckStrictMode(code, exception) {
assertDoesNotThrow(code);
......
......@@ -24,6 +24,8 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Flags: --noharmony-scoping
"use strict";
const x = 42;
......@@ -34,6 +34,10 @@ from testrunner.local import utils
from testrunner.objects import testcase
FLAGS_PATTERN = re.compile(r"//\s+Flags:(.*)")
INVALID_FLAGS = ["--enable-slow-asserts"]
class PreparserTestSuite(testsuite.TestSuite):
def __init__(self, name, root):
super(PreparserTestSuite, self).__init__(name, root)
......@@ -104,6 +108,15 @@ class PreparserTestSuite(testsuite.TestSuite):
first = testcase.flags[0]
if first != "-e":
testcase.flags[0] = os.path.join(self.root, first)
source = self.GetSourceForTest(testcase)
result = []
flags_match = re.findall(FLAGS_PATTERN, source)
for match in flags_match:
result += match.strip().split()
result += context.mode_flags
result = [x for x in result if x not in INVALID_FLAGS]
result.append(os.path.join(self.root, testcase.path + ".js"))
return testcase.flags + result
return testcase.flags
def GetSourceForTest(self, testcase):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment