[test_runner] Unify name for passing DDC options

Use "ddcOptions" in test files to closer resemble the name 'ddc-options'
from the test matrix or command line option.

I don't like that this option is in camelCase when written in a test
file but uses a dash when passed on the command line but that matches 
all the other implementations (dart2jsOptions, sharedOptionn, etc). 
Hopefully it is the most discoverable or least surprising choice.

Change-Id: I8f0d53d50416b952c9ea74406c18bb9c700f98dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/281820
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
This commit is contained in:
Nicholas Shahan 2023-02-14 20:13:57 +00:00 committed by Commit Queue
parent ee9a0a6a60
commit b9699971dc
5 changed files with 7 additions and 7 deletions

View file

@ -238,7 +238,7 @@ class TestFile extends _TestFileBase {
_parseStringOption(filePath, contents, 'dart2jsOptions');
var dart2wasmOptions =
_parseStringOption(filePath, contents, 'dart2wasmOptions');
var ddcOptions = _parseStringOption(filePath, contents, 'dartdevcOptions');
var ddcOptions = _parseStringOption(filePath, contents, 'ddcOptions');
var otherResources = _parseStringOption(
filePath, contents, 'OtherResources',
allowMultiple: true);

View file

@ -108,7 +108,7 @@ void testParseOtherOptions() {
/\/ SharedOptions=shared options
/\/ dart2jsOptions=dart2js options
/\/ dart2wasmOptions=dart2wasm options
/\/ dartdevcOptions=ddc options
/\/ ddcOptions=ddc options
/\/ OtherResources=other resources
/\/ SharedObjects=shared objects
/\/ Requirements=nnbd nnbd-strong
@ -139,8 +139,8 @@ void testParseOtherOptions() {
/\/ dart2wasmOptions=second
""");
expectParseThrows("""
/\/ dartdevcOptions=first
/\/ dartdevcOptions=second
/\/ ddcOptions=first
/\/ ddcOptions=second
""");
expectParseThrows("""
/\/ Requirements=nnbd

View file

@ -4,7 +4,7 @@
// Requirements=nnbd-weak
// dartdevcOptions=--weak-null-safety-errors
// ddcOptions=--weak-null-safety-errors
import 'package:expect/expect.dart';

View file

@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// dartdevcOptions=--no-enable-asserts
// ddcOptions=--no-enable-asserts
import "package:expect/expect.dart";

View file

@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// dartdevcOptions=--no-enable-asserts
// ddcOptions=--no-enable-asserts
import "package:expect/expect.dart";