dart-sdk/tests
Paul Berry 7e5297e5f8 Enable the fallback exhaustiveness algorithm (with improvements).
This change improves the fallback exhaustiveness algorithm so that it
also takes advantage of the old, pre-patterns exhaustiveness logic for
enums.  This ensures that the fallback exhaustiveness algorithm won't
seem like a regression to users who are used to the old pre-patterns
behaviour.  This required extending the old algorithm to handle
new-style switch statements (which have a different representation
from classic switch statements in the CFE) as well as switch
expressions.

We also turn on the fallback exhaustiveness algorithm by default.
Unit tests can still disable it by temporarily setting the global
variable `useFallbackExhaustivenessAlgorithm` to `false`.

The hope is that this algorithm will be short-lived; we are just using
it so that if we decide to enable pattern support in the near future,
users will experience something that is sound.  That is, it may
require `default` or `_` cases more often than is strictly necessary,
but it shouldn't ever allow a non-exhaustive switch in a place where
an exhaustive switch is required.

Change-Id: I4a8b7f996b109c4ee8832f286c3b3bf3b216fe8b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/284840
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2023-02-27 17:36:02 +00:00
..
co19 [dart2js, ddc] Skip flaky tests 2023-02-13 23:44:59 +00:00
co19_2 [dart2js, ddc] Skip flaky tests 2023-02-13 23:44:59 +00:00
corelib [dart2js, ddc] Skip flaky tests 2023-02-13 23:44:59 +00:00
corelib_2 [dart2js, ddc] Skip flaky tests 2023-02-13 23:44:59 +00:00
dartdevc [test_runner] Unify name for passing DDC options 2023-02-14 20:13:57 +00:00
dartdevc_2 [test_runner] Add new name for ddc compiler 2023-02-09 18:32:58 +00:00
ffi [test/ffi] Beef up @Native testing 2023-02-24 21:16:50 +00:00
ffi_2 [vm] Fix Dart_CObject_Type breaking change 2023-02-20 11:59:19 +00:00
language Enable the fallback exhaustiveness algorithm (with improvements). 2023-02-27 17:36:02 +00:00
language_2 [tests] Fix expectations in language/async_star/async_star_await_for_test 2023-02-27 16:25:50 +00:00
lib Revert "[dart:js_interop] Add literal constructors for inline classes" 2023-02-24 20:42:14 +00:00
lib_2 Optimize LineSplitter. 2023-02-21 11:33:24 +00:00
modular [Reland][cfe] Support external constructor with final fields 2023-01-17 17:29:28 +00:00
standalone [test] Add missing resource dependency to web_socket_error_test. 2023-02-14 19:22:14 +00:00
standalone_2 Fix unbalanced call to Dart_TypedDataAcquireData. 2023-02-14 01:44:17 +00:00
web Revert "[dart:js_interop] Add literal constructors for inline classes" 2023-02-24 20:42:14 +00:00
web_2 [test_runner] Unify name for passing DDC options 2023-02-14 20:13:57 +00:00
legacy_status_dart2js.csv Spelling tests 2022-12-19 12:56:47 +00:00
OWNERS [infra] Add OWNERS to the Dart SDK 2022-02-14 14:06:34 +00:00
README.md

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