| Index: test/runtime/dart_runtime_test.dart
|
| diff --git a/test/runtime/dart_runtime_test.dart b/test/runtime/dart_runtime_test.dart
|
| index f890f2be6f71db51ee9056938f21b6863eb30217..9b2576248b437f39013c778af589c20e945221ab 100644
|
| --- a/test/runtime/dart_runtime_test.dart
|
| +++ b/test/runtime/dart_runtime_test.dart
|
| @@ -6,8 +6,12 @@
|
| import 'dart:collection';
|
| import 'dart:mirrors';
|
| import 'package:unittest/unittest.dart';
|
| +import 'package:dev_compiler/config.dart';
|
| import 'package:dev_compiler/runtime/dart_runtime.dart';
|
|
|
| +final bool intIsNonNullable = TypeOptions.NONNULLABLE_TYPES.contains('int');
|
| +final bool doubleIsNonNullable = TypeOptions.NONNULLABLE_TYPES.contains('double');
|
| +
|
| class A {
|
| int x;
|
| }
|
| @@ -91,7 +95,11 @@ void main() {
|
| checkType(5, String, false);
|
|
|
| expect(cast(5, int), equals(5));
|
| - expect(() => cast(null, int), throws);
|
| + if (intIsNonNullable) {
|
| + expect(() => cast(null, int), throws);
|
| + } else {
|
| + expect(cast(null, int), equals(null));
|
| + }
|
| });
|
|
|
| test('dynamic', () {
|
|
|