dart-sdk/tests
Jonas Termansen 0683e9273d [dart:io] Throw StateError in meaningless getters on detached processes.
This is a breaking change. https://github.com/dart-lang/sdk/issues/40483

The Process class will now throw a StateError if the process is detached
upon accessing the exitCode getter. It now also throws when not
connected to the child process's stdio upon accessing the stdin, stdout,
and stderr getters. Previously these getters would all return null.

The getters in question are meaningless for detached processes and there
is no reason to use them in that case. To provide a better experience
when Dart becomes null-safe, these getters are changed to throw and
never return null, which avoids all legitimate uses of the getters from
needing a null check that will never fail.

The NNBD migration required making subtle changes to some dart:io
semantics in order to provide a better API. This change backports one of
these semantic changes to the unmigrated SDK so any issues can be
discovered now instead of blocking the future SDK unfork.

Change-Id: I776e0dc8bcd517d70332c60dd8ab88db17746aa5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134329
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2020-02-20 13:18:38 +00:00
..
angular
co19 [co19] Handle builders using co19 with test selectors 2019-12-17 17:24:09 +00:00
co19_2 Remove dart:mirrors library from dart2js and ddc SDKs 2020-02-07 17:34:54 +00:00
compiler [cfe] Do not hoist this expressions 2020-02-19 11:31:59 +00:00
corelib Cleaning up corelib test migrations. 2020-02-03 19:06:17 +00:00
corelib_2 Update all Slow tests to be Slow, Pass. 2020-02-01 00:17:42 +00:00
dart
ffi [test/ffi] Re-enable disabled tests 2020-02-19 08:53:39 +00:00
ffi_2 [vm/ffi] Change asFunction and lookFunction to extension methods 2020-02-14 15:46:37 +00:00
kernel Remove the old "preview Dart 2" flags from the test runner. 2019-09-05 16:59:43 +00:00
language Don't report StrongModeCode.INVALID_CAST_* for NNBD libraries. 2020-02-18 17:35:54 +00:00
language_2 Validate not only errors, but also warnings. 2020-02-13 21:31:59 +00:00
lib Fix timer_cancel_test. 2020-02-15 02:40:00 +00:00
lib_2 Revert fileapi_entry_test to use unittest.dart 2020-02-19 21:00:44 +00:00
modular [CFE] Use package config v2 2020-02-12 10:07:25 +00:00
search
standalone Reland [dart:io] Stop forcing lower case on HttpHeaders 2020-02-14 22:23:17 +00:00
standalone_2 [dart:io] Throw StateError in meaningless getters on detached processes. 2020-02-20 13:18:38 +00:00
legacy_status_dart2js.csv [infra] Remove non-essential test expectations with comments from general status files 2019-10-01 06:18:59 +00:00
README.md Update tests/README to point to new doc. 2019-08-06 22:19:42 +00:00

This directory contains tests of the language and core library implementations. For more information, see https://github.com/dart-lang/sdk/wiki/Testing.