dart-sdk/tests/language
Tess Strickland 844a5176ff [vm] Fix ArgumentsDescriptor uses in DoArgumentTypesMatch.
Use of PositionalCount() and PositionAt() as indices in the arguments
array must account for the type arguments if present. Otherwise, we'll
either skip checking the last positional argument (in the former case)
or check against the wrong arguments (in the latter case).

In nosuchmethod_forwarding_arguments_test.dart, add cases that check for
the above mistakes.

In require_named_args_strong_test.dart, use the more specific
throwsTypeError or throwsNoSuchMethod checks instead of the generic
throwsError to ensure the correct error is thrown.

TEST=Changed tests to add extra cases for failures that can happen.

Cq-Include-Trybots: luci.dart.try:vm-kernel-linux-debug-x64-try,vm-kernel-nnbd-linux-debug-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-nnbd-linux-debug-x64-try
Change-Id: If5e6c310d36d244bb0650ded54e32e583732584e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171947
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2020-11-16 11:53:39 +00:00
..
abstract Move errors from StaticWarningCode to CompileTimeErrorCode. 2020-07-26 04:19:25 +00:00
accessor_conflict Migrate language_2/accessor_conflict to NNBD. 2020-02-04 09:52:03 +00:00
argument Make update_static_error_tests work on Windows (again) 2020-09-10 06:21:13 +00:00
assert Move codes from StaticTypeWarningCode into CompileTimeErrorCode. 2020-07-27 16:44:15 +00:00
assign Remove 'checked mode' from checked_mode_compile_time_errors 2020-07-31 19:20:58 +00:00
async Fix async test to match inference changes from #43162. 2020-09-16 14:39:28 +00:00
async_nested Migrate language_2/async_nested to NNBD. 2020-02-12 20:46:37 +00:00
async_star Add new tests, cf. #1060 (void generators) 2020-07-16 14:07:13 +00:00
await Reland "Flow analysis: promote to non-nullable on initialization" 2020-10-07 13:14:55 +00:00
bool [tests/nnbd] Fork language/bool tests for weak and strong mode 2020-04-01 00:35:37 +00:00
call Move codes from StaticTypeWarningCode into CompileTimeErrorCode. 2020-07-27 16:44:15 +00:00
canonicalize Migrate language_2/canonicalize to NNBD. 2020-03-31 00:42:49 +00:00
cascade Move codes from StaticTypeWarningCode into CompileTimeErrorCode. 2020-07-27 16:44:15 +00:00
class Simplifying and recategorizing cyclic imports test 2020-09-14 20:20:49 +00:00
closure Move codes from StaticTypeWarningCode into CompileTimeErrorCode. 2020-07-27 16:44:15 +00:00
compile_time_constant [CFE] Better error messages for class initialization errors 2020-09-09 11:37:47 +00:00
const [cfe] Special case Null in assignability errors. 2020-11-09 11:07:44 +00:00
constants_2018 Add test of potentially constant scopes. 2020-10-29 10:11:53 +00:00
constructor [cfe] Update test expectations 2020-10-01 11:27:12 +00:00
control_flow_collections [cfe] Indicate nullability as assignability issue when appropriate 2020-10-29 16:10:03 +00:00
covariant Move codes from StaticTypeWarningCode into CompileTimeErrorCode. 2020-07-27 16:44:15 +00:00
covariant_override Migrate language_2/covariant_override to NNBD. 2020-04-02 19:04:39 +00:00
deferred Add tests for the identity of constants repeated in different loading units but not present in the main unit. 2020-10-30 19:16:42 +00:00
double Move errors from StaticWarningCode to CompileTimeErrorCode. 2020-07-26 04:19:25 +00:00
double_literals Migrate language_2/double_literals to NNBD. 2020-04-04 00:20:37 +00:00
dynamic Move errors from StaticWarningCode to CompileTimeErrorCode. 2020-07-26 04:19:25 +00:00
enum [parser] Issue different warnings for missing identifier based on whether the token is used or not. 2020-09-14 08:55:18 +00:00
exception Make tests not assume catch(e) gives e type dynamic. 2020-05-05 09:57:23 +00:00
export Simplifying and recategorizing cyclic imports test 2020-09-14 20:20:49 +00:00
extension_methods [cfe] Fix missing case of using receiver type instead of bound 2020-10-30 16:33:51 +00:00
external_abstract_fields [cfe] Implemenet abstract fields errors 2020-07-20 12:05:54 +00:00
factory Move codes from StaticTypeWarningCode into CompileTimeErrorCode. 2020-07-27 16:44:15 +00:00
field Move codes from StaticTypeWarningCode into CompileTimeErrorCode. 2020-07-27 16:44:15 +00:00
final [CFE] Better error messages for class initialization errors 2020-09-09 11:37:47 +00:00
function [cfe] Infer Object from constraints similar to T? = dynamic 2020-09-16 11:36:28 +00:00
function_subtype Rename is{Strong,Weak}Mode to has{Sound,Unsound}NullSafety 2020-11-05 14:26:53 +00:00
function_type Migrate language_2/function_type to NNBD. 2020-05-05 01:38:43 +00:00
generic Rename is{Strong,Weak}Mode to has{Sound,Unsound}NullSafety 2020-11-05 14:26:53 +00:00
generic_methods Rename is{Strong,Weak}Mode to has{Sound,Unsound}NullSafety 2020-11-05 14:26:53 +00:00
getter [cfe] Report error on non-void setter return type 2020-09-02 12:43:12 +00:00
identifier Move codes from StaticTypeWarningCode into CompileTimeErrorCode. 2020-07-27 16:44:15 +00:00
identity Migrate language_2/identity to NNBD. 2020-05-15 18:05:02 +00:00
if Migrate language_2/if to NNBD. 2020-05-15 16:00:12 +00:00
if_null [cfe] Special case Null in assignability errors. 2020-11-09 11:07:44 +00:00
implicit_creation Migrate language_2/implicit_creation to NNBD. 2020-05-20 22:04:05 +00:00
implicit_downcast_during Reland "Flow analysis: promote to non-nullable on initialization" 2020-10-07 13:14:55 +00:00
import Move codes from StaticTypeWarningCode into CompileTimeErrorCode. 2020-07-27 16:44:15 +00:00
inference [cfe] Use combined member signature for override inference. 2020-10-08 15:29:05 +00:00
initializing_formal Move codes from StaticTypeWarningCode into CompileTimeErrorCode. 2020-07-27 16:44:15 +00:00
instance Migrate language_2/instance to NNBD. 2020-05-26 18:35:20 +00:00
instantiate_to_bound Issue 40764. Use Never instead of Null when converting super-bounded to regular-bounded. 2020-02-26 20:12:51 +00:00
interceptor Migrate language_2/interceptor to NNBD. 2020-05-26 16:04:15 +00:00
interface Move errors from StaticWarningCode to CompileTimeErrorCode. 2020-07-26 04:19:25 +00:00
invalid_returns Move codes from StaticTypeWarningCode into CompileTimeErrorCode. 2020-07-27 16:44:15 +00:00
is Rename is{Strong,Weak}Mode to has{Sound,Unsound}NullSafety 2020-11-05 14:26:53 +00:00
label [parser] Issue different warnings for missing identifier based on whether the token is used or not. 2020-09-14 08:55:18 +00:00
lazy [tests/nnbd] Fix tests/language/lazy/static8_test 2020-07-17 20:27:07 +00:00
least_upper_bound Adjust tests verifying the static type dynamic 2020-10-30 16:10:30 +00:00
library Migrate language_2/library to NNBD. 2020-05-30 01:10:44 +00:00
list Unify three diagnostic codes for documentation purposes 2020-10-26 04:24:55 +00:00
loop Migrate language_2/loop to NNBD. 2020-05-29 23:48:57 +00:00
main [cfe] Report errors in invalid main declarations 2020-10-05 14:37:33 +00:00
malbounded Migrate language_2/malbounded to NNBD. 2020-06-03 01:17:26 +00:00
malformed Move codes from StaticTypeWarningCode into CompileTimeErrorCode. 2020-07-27 16:44:15 +00:00
map Unify three diagnostic codes for documentation purposes 2020-10-26 04:24:55 +00:00
metadata Add further cases to metadata test 2020-10-19 16:10:08 +00:00
method Move errors from StaticWarningCode to CompileTimeErrorCode. 2020-07-26 04:19:25 +00:00
mixin [dartdevc] Lazily executing deferred types to prevent improper module reordering. 2020-10-06 21:31:33 +00:00
mixin_constructor_forwarding Add test for mixin application constructor forwarding of default values. 2020-06-12 16:36:40 +00:00
mixin_declaration Migrate language_2/mixin_declaration to NNBD. 2020-06-10 01:09:45 +00:00
new Move errors from StaticWarningCode to CompileTimeErrorCode. 2020-07-26 04:19:25 +00:00
nnbd [vm] Fix ArgumentsDescriptor uses in DoArgumentTypesMatch. 2020-11-16 11:53:39 +00:00
no_such_method Migrate language_2/no_such_method to NNBD. 2020-06-03 17:15:10 +00:00
nonfunction_type_aliases Add cycle detection test cases for nonfunction type aliases. 2020-10-16 23:13:42 +00:00
nosuchmethod_forwarding [vm] Fix ArgumentsDescriptor uses in DoArgumentTypesMatch. 2020-11-16 11:53:39 +00:00
null Rename is{Strong,Weak}Mode to has{Sound,Unsound}NullSafety 2020-11-05 14:26:53 +00:00
null_aware [cfe] Warn on null aware access on this and static members 2020-10-15 08:48:33 +00:00
number Move codes from StaticTypeWarningCode into CompileTimeErrorCode. 2020-07-27 16:44:15 +00:00
operator [cfe] Fix missing case of using receiver type instead of bound 2020-10-30 16:33:51 +00:00
optimize Move errors from StaticWarningCode to CompileTimeErrorCode. 2020-07-26 04:19:25 +00:00
override Move codes from StaticTypeWarningCode into CompileTimeErrorCode. 2020-07-27 16:44:15 +00:00
parameter Remove the diagnostic default_value_in_function_typed_parameter 2020-09-25 04:35:53 +00:00
part Migrate language_2/part to NNBD. 2020-06-08 23:16:55 +00:00
prefix Move codes from StaticTypeWarningCode into CompileTimeErrorCode. 2020-07-27 16:44:15 +00:00
private Move codes from StaticTypeWarningCode into CompileTimeErrorCode. 2020-07-27 16:44:15 +00:00
propagate Migrate language_2/propagate to NNBD. 2020-06-08 23:36:46 +00:00
redirecting Move errors from StaticWarningCode to CompileTimeErrorCode. 2020-07-26 04:19:25 +00:00
reg_exp Migrate language_2/reg_exp to NNBD. 2020-06-09 18:45:33 +00:00
regress [VM/kernel] Remove obsolete workaround when reading dynamic bound from kernel. 2020-11-10 21:30:26 +00:00
resolution Migrate language_2/resolution to NNBD. 2020-06-09 00:44:05 +00:00
return Migrate language_2/return to NNBD. 2020-06-09 16:31:44 +00:00
rewrite Move codes from StaticTypeWarningCode into CompileTimeErrorCode. 2020-07-27 16:44:15 +00:00
script Migrate language_2/script to NNBD. 2020-06-12 01:41:47 +00:00
set_literals [tests] Add const-big-set-literal test 2020-10-20 11:07:23 +00:00
setter [cfe] Check getter/setter types on top level and extension members 2020-10-09 07:16:06 +00:00
spread_collections Reland "Flow analysis: promote to non-nullable on initialization" 2020-10-07 13:14:55 +00:00
stack_trace Migrate language_2/stack_trace to NNBD. 2020-06-17 00:28:06 +00:00
static Change resolution of assignment to PropertyAccess. 2020-09-11 15:50:20 +00:00
string [cfe] Indicate nullability as assignability issue when appropriate 2020-10-29 16:10:03 +00:00
subtyping_static Migrate language_2/subtyping_static to NNBD. 2020-06-15 20:53:55 +00:00
super [cfe] Warn on null aware access on this and static members 2020-10-15 08:48:33 +00:00
superinterface_variance Migrate language_2/superinterface_variance to NNBD. 2020-06-25 20:21:42 +00:00
switch Move errors from StaticWarningCode to CompileTimeErrorCode. 2020-07-26 04:19:25 +00:00
symbol Move codes from StaticTypeWarningCode into CompileTimeErrorCode. 2020-07-27 16:44:15 +00:00
sync_star [VM] Fixes yield* exception handling in sync*. 2020-10-27 06:46:27 +00:00
syntax Migrate language_2/syntax to NNBD. 2020-06-18 22:54:13 +00:00
this [cfe] Warn on null aware access on this and static members 2020-10-15 08:48:33 +00:00
top_level Migrate language_2/top_level to NNBD. 2020-06-18 21:09:52 +00:00
type Move errors from StaticWarningCode to CompileTimeErrorCode. 2020-07-26 04:19:25 +00:00
type_object Set readElement/Type and writeElement/Type for PostfixExpression. 2020-08-28 14:45:08 +00:00
type_promotion Move codes from StaticTypeWarningCode into CompileTimeErrorCode. 2020-07-27 16:44:15 +00:00
type_variable Move codes from StaticTypeWarningCode into CompileTimeErrorCode. 2020-07-27 16:44:15 +00:00
typedef Migrate language_2/typedef to NNBD. 2020-06-22 18:27:21 +00:00
unsorted [test_runner] Support detection of CFE warnings 2020-09-15 07:57:31 +00:00
value_class [cfe] Add Jenkins SMI hashcode combiner 2020-09-07 12:36:13 +00:00
variable Improve the highlight range for invalid_super_invocation 2020-11-01 15:24:51 +00:00
variance Update static errors for variance_in_inference_error_test. 2020-09-18 11:57:05 +00:00
vm Rename is{Strong,Weak}Mode to has{Sound,Unsound}NullSafety 2020-11-05 14:26:53 +00:00
void Migrate void tests to Null Safety. 2020-06-03 13:22:10 +00:00
analysis_options.yaml [tests] Add analysis options file to migrated test directories 2020-03-16 20:51:26 +00:00
await_type_error_test.dart Analyzer: Don't do recursive flattening of FutureOr in await. 2020-01-28 11:16:07 +00:00
await_type_test.dart Analyzer: Don't do recursive flattening of FutureOr in await. 2020-01-28 11:16:07 +00:00
compiler_annotations.dart Set up new test suites for migrating the tests to NNBD. 2019-11-19 00:18:43 +00:00
dynamic_type_helper.dart Migrate language_2/function to NNBD. 2020-04-25 01:53:20 +00:00
language.status Enable non-function type alias tests for the analyzer 2020-11-06 08:19:52 +00:00
language_analyzer.status Update all Slow tests to be Slow, Pass. 2020-02-01 00:17:42 +00:00
language_dart2js.status Update all Slow tests to be Slow, Pass. 2020-02-01 00:17:42 +00:00
language_dartdevc.status Update all Slow tests to be Slow, Pass. 2020-02-01 00:17:42 +00:00
language_kernel.status Remove remaining tests for bytecode mode 2020-10-09 22:30:19 +00:00
language_precompiled.status Move files under language_2 into subdirectories. 2019-12-11 19:18:00 +00:00
language_spec_parser.status Move files under language_2 into subdirectories. 2019-12-11 19:18:00 +00:00
language_vm.status Move files under language_2 into subdirectories. 2019-12-11 19:18:00 +00:00
library1.dart Migrate language_2/function to NNBD. 2020-04-25 01:53:20 +00:00
library2.dart Migrate language_2/function to NNBD. 2020-04-25 01:53:20 +00:00
library10.dart Migrate language_2/function to NNBD. 2020-04-25 01:53:20 +00:00
library11.dart Migrate language_2/function to NNBD. 2020-04-25 01:53:20 +00:00
library12.dart Migrate language_2/function to NNBD. 2020-04-25 01:53:20 +00:00
static_type_helper.dart Add tests for promotion behavior related to variable initialization. 2020-09-23 00:15:25 +00:00