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

Unified Diff: lib/src/testing.dart

Issue 977613002: Make int and double nullable by default (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Optimize away some nonnull checks Created 5 years, 10 months 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 side-by-side diff with in-line comments
Download patch
Index: lib/src/testing.dart
diff --git a/lib/src/testing.dart b/lib/src/testing.dart
index 2f2e4f84a136f8f6d6cbc86b6eea70daa97a07f4..a0558f7c419cb97851570e12978a49368e5c2c41 100644
--- a/lib/src/testing.dart
+++ b/lib/src/testing.dart
@@ -20,6 +20,7 @@ import 'package:dev_compiler/src/utils.dart';
import 'package:dev_compiler/src/info.dart';
import 'package:dev_compiler/src/options.dart';
import 'package:dev_compiler/src/report.dart';
+import 'package:dev_compiler/config.dart';
import 'package:dev_compiler/devc.dart' show compile;
/// Run the checker on a program with files contents as indicated in
@@ -49,7 +50,8 @@ import 'package:dev_compiler/devc.dart' show compile;
CheckerResults testChecker(Map<String, String> testFiles,
{bool allowConstCasts: true, String sdkDir, CheckerReporter reporter,
covariantGenerics: true, relaxedCasts: true, inferFromOverrides: true,
- inferStaticsFromIdentifiers: false, inferInNonStableOrder: false}) {
+ inferStaticsFromIdentifiers: false, inferInNonStableOrder: false,
+ nonnullableTypes: TypeOptions.NONNULLABLE_TYPES}) {
expect(testFiles.containsKey('/main.dart'), isTrue,
reason: '`/main.dart` is missing in testFiles');
@@ -61,7 +63,8 @@ CheckerResults testChecker(Map<String, String> testFiles,
relaxedCasts: relaxedCasts,
inferFromOverrides: inferFromOverrides,
inferStaticsFromIdentifiers: inferStaticsFromIdentifiers,
- inferInNonStableOrder: inferInNonStableOrder);
+ inferInNonStableOrder: inferInNonStableOrder,
+ nonnullableTypes: nonnullableTypes);
var resolver = sdkDir == null
? new TypeResolver.fromMock(mockSdkSources, options,
otherResolvers: [testUriResolver])

Powered by Google App Engine
This is Rietveld 408576698