Commit cff8c9b9 authored by oth's avatar oth Committed by Commit bot

Ensure mjsunit tests use dashes not underscores in flags directives.

BUG=chromium:505228
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#29355}
parent 972beef1
......@@ -33,7 +33,7 @@
// This exercises the code in runtime.cc in
// DeclareGlobal...Locally().
// Flags: --es52_globals
// Flags: --es52-globals
this.__proto__.foo = 42;
this.__proto__.bar = 87;
......
......@@ -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: --allow-natives-syntax --expose-gc --nostress-opt --typed-array-max_size_in-heap=2048
// Flags: --allow-natives-syntax --expose-gc --nostress-opt --typed-array-max-size-in-heap=2048
var elements_kind = {
fast_smi_only : 'fast smi only elements',
......
......@@ -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: --noenable_sse4_1 --allow-natives-syntax
// Flags: --noenable-sse4-1 --allow-natives-syntax
function test1() {
// Trigger overflow when converting/truncating double to integer.
......
......@@ -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: --allow-natives-syntax --nouse_inlining
// Flags: --allow-natives-syntax --nouse-inlining
// Test for negative zero that doesn't need bail out
......
......@@ -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: --allow-natives-syntax --nouse_inlining --noenable_sudiv
// Flags: --allow-natives-syntax --nouse-inlining --noenable-sudiv
// Use this function as reference. Make sure it is not inlined.
function div(a, b) {
......
......@@ -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: --allow-natives-syntax --nouse_inlining --enable_sudiv
// Flags: --allow-natives-syntax --nouse-inlining --enable-sudiv
// Use this function as reference. Make sure it is not inlined.
function div(a, b) {
......
......@@ -28,7 +28,7 @@
// Test runtime declaration of properties with var which are intercepted
// by JS accessors.
// Flags: --es52_globals
// Flags: --es52-globals
this.__defineSetter__("x", function() { hasBeenInvoked = true; });
this.__defineSetter__("y", function() { throw 'exception'; });
......
......@@ -28,7 +28,7 @@
// Test the case when exception is thrown from the parser when lazy
// compiling a function.
// Flags: --stack_size=46
// Flags: --stack-size=46
// NOTE: stack size constant above has been empirically chosen.
// If the test starts to fail in Genesis, consider increasing this constant.
......
......@@ -27,7 +27,7 @@
// Test that a function declaration cannot overwrite a read-only property.
// Flags: --es52_globals
// Flags: --es52-globals
function foobl() {}
assertTrue(typeof this.foobl == "function");
......
......@@ -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: --allow-natives-syntax --es52_globals
// Flags: --allow-natives-syntax --es52-globals
// Make sure that we can introduce global variables (using
// both var and const) that shadow even READ_ONLY variables
......
......@@ -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: --expose_gc
// Flags: --expose-gc
JSON.stringify(String.fromCharCode(1, -11).toString())
gc();
......
......@@ -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: --expose_gc
// Flags: --expose-gc
p1 = { };
p2 = { };
......
......@@ -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: --allow-natives-syntax --deopt_every_n_garbage_collections=1
// Flags: --allow-natives-syntax --deopt-every-n-garbage-collections=1
function foo(a, b) {
var l = a.length;
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --stack_size=150
// Flags: --stack-size=150
function f(a) {
f(a + 1);
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --deopt-every-n-times=1 --no-enable_sse4_1
// Flags: --deopt-every-n-times=1 --no-enable-sse4-1
function g(f, x, name) {
var v2 = f(x);
......
......@@ -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: --expose_gc
// Flags: --expose-gc
// This test makes sure that we do flush code with heap allocated locals.
// This can be a problem if eval is used within the scope.
......
......@@ -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: --expose-gc --nocleanup_code_caches_at_gc
// Flags: --expose-gc --nocleanup-code-caches-at-gc
function f(x) {
gc();
......
......@@ -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: --noanalyze_environment_liveness
// Flags: --noanalyze-environment-liveness
var r = /r/;
function f() {
......
......@@ -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: --gc_global
// Flags: --gc-global
// Regression test for regexp that has multiple matches and which
// internally calls RegExpImpl::IrregexpExecOnce more than once without
......
......@@ -103,7 +103,7 @@ whitespace/todo
# TODO(bmeurer): Fix and re-enable readability/check
LINT_OUTPUT_PATTERN = re.compile(r'^.+[:(]\d+[:)]|^Done processing')
FLAGS_LINE = re.compile("//\s*Flags:.*--([A-z0-9-])+_[A-z0-9].*\n")
def CppLintWorker(command):
try:
......@@ -414,6 +414,12 @@ class SourceProcessor(SourceFileProcessor):
print "%s does not have two empty lines between declarations " \
"in line %s." % (name, linenumbers)
result = False
# Sanitize flags for fuzzer.
if "mjsunit" in name:
match = FLAGS_LINE.search(contents)
if match:
print "%s Flags should use '-' (not '_')" % name
result = False
return result
def ProcessFiles(self, files, path):
......
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