mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 02:07:06 +00:00
b9699971dc
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>
18 lines
493 B
Dart
18 lines
493 B
Dart
// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
|
|
// 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.
|
|
|
|
// Requirements=nnbd-weak
|
|
|
|
// ddcOptions=--weak-null-safety-errors
|
|
|
|
import 'package:expect/expect.dart';
|
|
|
|
void main() {
|
|
Expect.throwsTypeError(() => null as int);
|
|
dynamic dynamicNull = null;
|
|
Expect.throwsTypeError(() => fn(dynamicNull));
|
|
}
|
|
|
|
void fn(StringBuffer arg) {}
|