dart-sdk/tests/corelib
Lasse R.H. Nielsen d8fa6fe255 Fix bug in VM _CompactHashIterable.
The iterable is used for the `keys` and `values` of `LinkedHashMap`.
The original code remembered the internal data list and used-count
when the iterable was created, and if the iterable was modified
between creating and iterating, the iterated values would not match
the map.
The solution is to not cache those values, and read them from the
hash table when creting the `Iterator` instead.

Fixes #48282

Tested: Added regression test to corelib/map_test
Bug: https://dartbug.com/48282
Change-Id: I79310615e7090556e6f45b0d7f297755951ef046
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312263
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2023-07-04 11:00:50 +00:00
..
regexp [vm/regex] Pick a fix for unicode negated range RegExp. 2023-04-26 19:46:06 +00:00
apply2_test.dart Remove uses of : as default value separator in some tests/ directories. 2022-09-07 14:49:17 +00:00
apply3_test.dart
apply4_test.dart
apply5_test.dart
apply6_test.dart [js_runtime] Don't modify inputs to Function.apply 2021-06-24 03:29:38 +00:00
apply_generic_function_test.dart [test] Fix various static errors in corelib tests 2020-04-16 09:20:21 +00:00
apply_test.dart [test] Fix various static errors in corelib tests 2020-04-16 09:20:21 +00:00
bigint_add_test.dart [vm, compiler] RISC-V BigInt intrinsics. 2022-03-08 18:08:44 +00:00
bigint_bitlength_test.dart Spelling sdk 2023-01-20 12:37:49 +00:00
bigint_div_test.dart [vm, compiler] RISC-V BigInt intrinsics. 2022-03-08 18:08:44 +00:00
bigint_from_test.dart [tests] Avoid small --optimization-counter-threshold in tests 2022-10-10 21:04:18 +00:00
bigint_js_test.dart [tests] Avoid small --optimization-counter-threshold in tests 2022-10-10 21:04:18 +00:00
bigint_mod_test.dart [vm, compiler] RISC-V BigInt intrinsics. 2022-03-08 18:08:44 +00:00
bigint_mul_test.dart [vm, compiler] RISC-V BigInt intrinsics. 2022-03-08 18:08:44 +00:00
bigint_parse_radix_test.dart [tests] Avoid small --optimization-counter-threshold in tests 2022-10-10 21:04:18 +00:00
bigint_sll_test.dart [vm, compiler] Fix BigInt._rsh intrinsic when shifting out at least one word on RISC-V. 2022-05-26 22:54:29 +00:00
bigint_sra_test.dart [vm, compiler] Fix BigInt._rsh intrinsic when shifting out at least one word on RISC-V. 2022-05-26 22:54:29 +00:00
bigint_sub_test.dart [vm, compiler] RISC-V BigInt intrinsics. 2022-03-08 18:08:44 +00:00
bigint_test.dart [tests] Avoid small --optimization-counter-threshold in tests 2022-10-10 21:04:18 +00:00
bit_twiddling_test.dart
bool_from_environment2_test.dart
bool_from_environment_test.dart Reland "[test] Fix some tests for Dart2Wasm." 2022-11-04 16:10:39 +00:00
bool_hashcode_test.dart
bool_operator_test.dart
bool_parse_test.dart Add boolean parse 2023-03-09 15:14:32 +00:00
bool_try_parse_test.dart Add boolean parse 2023-03-09 15:14:32 +00:00
cast_errors_test.dart Move codes from StaticTypeWarningCode into CompileTimeErrorCode. 2020-07-27 16:44:15 +00:00
cast_helper.dart [tests] Fix cast_test and migrate to nnbd. 2020-04-30 02:33:53 +00:00
cast_iterable_test.dart [tests] Fix cast_test and migrate to nnbd. 2020-04-30 02:33:53 +00:00
cast_list_test.dart [tests] Fix cast_test and migrate to nnbd. 2020-04-30 02:33:53 +00:00
cast_map_test.dart [tests] Fix cast_test and migrate to nnbd. 2020-04-30 02:33:53 +00:00
cast_set_test.dart [tests] Fix cast_test and migrate to nnbd. 2020-04-30 02:33:53 +00:00
cast_strong_test.dart Change types to <C?, D> in cast test for nnbd 2020-05-01 17:02:23 +00:00
cast_weak_test.dart Change types to <C?, D> in cast test for nnbd 2020-05-01 17:02:23 +00:00
collection_from_test.dart
collection_length_test.dart Spelling tests 2022-12-19 12:56:47 +00:00
collection_of_test.dart
collection_removes_test.dart
collection_test.dart
collection_to_string_test.dart
compare_to2_test.dart
compare_to_test.dart
const_list_literal_test.dart
const_list_remove_range_test.dart
const_list_set_range_test.dart
core_runtime_types_static_test.dart Migrate corelib and lib tests off @compile-error. 2023-04-20 19:19:01 +00:00
core_runtime_types_test.dart Make all CastErrors be TypeErrors. 2020-03-11 23:31:06 +00:00
corelib.status [test] Skip corelib tests relying on symbol names and stack traces in obfuscated and dwarf modes 2023-05-26 20:05:08 +00:00
data_uri_test.dart Make UriData more case-insensitive. 2022-02-22 10:47:41 +00:00
date_time2_test.dart
date_time3_test.dart
date_time4_test.dart
date_time5_test.dart
date_time6_test.dart
date_time7_test.dart
date_time8_test.dart
date_time9_test.dart
date_time10_test.dart
date_time11_test.dart [tests] Cleaning up migrated corelib tests. 2020-03-24 17:34:25 +00:00
date_time_copy_with_test.dart DateTime copyWith extension 2022-10-20 10:50:25 +00:00
date_time_extremes_test.dart
date_time_far_away_dates_test.dart
date_time_js_modified_test.dart [ddc] Copy JS 2-digit year handling from dart2js. 2020-09-26 01:11:54 +00:00
date_time_parse_test.dart
date_time_test.dart Add DateTime.timestamp() constructor for "now as UTC". 2023-03-31 20:52:31 +00:00
double_ceil2_test.dart
double_ceil_test.dart
double_ceil_to_double_test.dart
double_compare_test.dart
double_floor2_test.dart
double_floor_test.dart
double_floor_to_double_test.dart
double_hash_code_test.dart [vm/sse41] Fix use of pextrd when sse41 is not available. 2022-12-08 23:29:14 +00:00
double_parse_test.dart Fix year and comma in header. 2023-02-08 17:45:40 +00:00
double_round2_test.dart
double_round3_test.dart
double_round4_test.dart
double_round_test.dart
double_round_to_double2_test.dart
double_round_to_double3_test.dart
double_round_to_double_test.dart
double_truncate2_test.dart
double_truncate_test.dart
double_truncate_to_double_test.dart
double_try_parse_test.dart Fix year and comma in header. 2023-02-08 17:45:40 +00:00
duration_big_num_test.dart
duration_double_multiplication_test.dart
duration_test.dart Fix bug in Duration.toString. 2023-03-30 14:02:38 +00:00
dynamic_nosuchmethod_test.dart [vm] Reland "Remove non-covariant checks from closure bodies (part 1)" 2020-07-21 10:00:41 +00:00
error_stack_trace1_test.dart Make tests not assume catch(e) gives e type dynamic. 2020-05-05 09:57:23 +00:00
error_stack_trace2_test.dart Spelling tests 2022-12-19 12:56:47 +00:00
error_stack_trace_test.dart Make tests not assume catch(e) gives e type dynamic. 2020-05-05 09:57:23 +00:00
error_throw_with_stacktrace_test.dart Don't assume that a stack overflow is an Error. 2021-11-10 21:36:13 +00:00
errors_test.dart Deprecate checkValidIndex and avoid using it in the core library. 2022-11-08 19:02:35 +00:00
exception_implementation_test.dart
expando_test.dart Rereland "[vm/ffi] Disallow Pointers and structs in finalizers and expandos" 2021-04-14 12:07:18 +00:00
expression_test.dart
for_in_test.dart
format_exception_test.dart
from_environment_const_type_test.dart
from_environment_const_type_undefined_test.dart Change tests to expect new behavior of fromEnvironment 2020-03-17 13:43:17 +00:00
from_environment_default_value_test.dart Added new tests. 2020-03-27 19:02:52 +00:00
growable_list_test.dart [tests] Remove more deprecated List constructor usage in tests 2020-04-07 20:09:26 +00:00
has_next_iterator_test.dart
hash_map2_test.dart
hash_map_test.dart
hash_set_test.dart
hash_set_type_check_test.dart
hashcode_boxed_test.dart
hashcode_test.dart
hidden_library2_test.dart
int_ceil_test.dart
int_ceil_to_double_test.dart
int_floor_test.dart
int_floor_to_double_test.dart
int_from_environment2_test.dart Change tests to expect new behavior of fromEnvironment 2020-03-17 13:43:17 +00:00
int_from_environment_int64_test.dart
int_from_environment_test.dart
int_modpow_hard_test.dart Spelling pkg analyzer lib 2023-01-25 14:08:27 +00:00
int_modulo_arith_test.dart
int_parse_radix_int64_test.dart
int_parse_radix_test.dart [3.0 alpha] Remove deprecated onError API on int.parse, double.parse, and num.parse 2022-12-12 09:54:54 +00:00
int_parse_with_limited_ints_test.dart [3.0 alpha] Remove deprecated onError API on int.parse, double.parse, and num.parse 2022-12-12 09:54:54 +00:00
int_round_test.dart
int_round_to_double_test.dart
int_to_int_test.dart
int_truncate_test.dart
int_truncate_to_double_test.dart
int_try_parse_int64_test.dart
int_try_parse_test.dart
integer_arith_vm_test.dart
integer_parsed_arith_vm_test.dart
integer_parsed_div_rem_vm_test.dart
integer_parsed_mul_div_vm_test.dart
integer_to_radix_string_test.dart
integer_to_string_test.dart
invocation_test.dart
is_operator_basic_types_test.dart
iterable_contains2_test.dart
iterable_contains_test.dart [tests] Removing more List constructor usage in corelib tests. 2020-04-06 19:17:54 +00:00
iterable_element_at_test.dart
iterable_empty_test.dart Turn on the experimental feature inference-update-1. 2022-05-24 13:54:23 +00:00
iterable_expand_test.dart
iterable_extension_test.dart Add nonNulls, indexed and other extensions on iterables. 2023-04-04 23:05:54 +00:00
iterable_first_test.dart
iterable_first_where_test.dart
iterable_fold_test.dart [tests] Removing more List constructor usage in corelib tests. 2020-04-06 19:17:54 +00:00
iterable_followed_by_test.dart [tests] Cleaning up migrated corelib tests. 2020-03-24 17:34:25 +00:00
iterable_generate_test.dart
iterable_join_test.dart
iterable_last_test.dart
iterable_last_where_test.dart
iterable_length_test.dart
iterable_mapping_test.dart
iterable_reduce_test.dart [tests] Removing more List constructor usage in corelib tests. 2020-04-06 19:17:54 +00:00
iterable_return_type_helper.dart [tests] Clean up List constructor usage and unused multi-test 2020-04-01 00:03:46 +00:00
iterable_return_type_int64_test.dart [tests] Clean up List constructor usage and unused multi-test 2020-04-01 00:03:46 +00:00
iterable_return_type_test.dart [tests] Clean up List constructor usage and unused multi-test 2020-04-01 00:03:46 +00:00
iterable_single_test.dart
iterable_single_where_test.dart
iterable_skip_test.dart
iterable_skip_while_test.dart
iterable_take_test.dart Make ListMixin.take check that the argument is not null. 2021-01-28 17:19:35 +00:00
iterable_take_while_test.dart
iterable_test.dart
iterable_to_list_test.dart Remove uses of : as default value separator in some tests/ directories. 2022-09-07 14:49:17 +00:00
iterable_to_set_test.dart
iterable_tostring_test.dart
iterable_where_type_test.dart
json_map_test.dart
linked_hash_map_from_iterable_test.dart
linked_hash_map_from_iterables_test.dart
linked_hash_map_test.dart [tests] Removing List constructor usage in corelib tests. 2020-03-30 19:58:08 +00:00
list_as_map_test.dart [tests] Removing List constructor usage in corelib tests. 2020-03-30 19:58:08 +00:00
list_concurrent_modify_self_test.dart [tests] Split corelib{,_2}/list_concurrent_modify_test 2020-11-05 19:46:35 +00:00
list_concurrent_modify_test.dart [tests] Split corelib{,_2}/list_concurrent_modify_test 2020-11-05 19:46:35 +00:00
list_contains_argument_order_test.dart [tests] Removing List constructor usage in corelib tests. 2020-03-30 19:58:08 +00:00
list_copy_range_test.dart
list_fill_range_test.dart
list_filled_type_argument_test.dart
list_first_test.dart
list_fixed_test.dart [tests] Removing List constructor usage in corelib tests. 2020-03-30 19:58:08 +00:00
list_for_each_test.dart [tests] Removing List constructor usage in corelib tests. 2020-03-30 19:58:08 +00:00
list_get_range_test.dart
list_growable_test.dart [tests] Removing List constructor usage in corelib tests. 2020-03-30 19:58:08 +00:00
list_index_of_test.dart [tests] Removing List constructor usage in corelib tests. 2020-03-30 19:58:08 +00:00
list_insert_all_test.dart [nnbd/test] Fix some strong mode tests. 2020-03-31 18:14:45 +00:00
list_insert_test.dart [tests] Removing List constructor usage in corelib tests. 2020-03-30 19:58:08 +00:00
list_iterators_test.dart [tests] Removing List constructor usage in corelib tests. 2020-03-30 19:58:08 +00:00
list_last_test.dart
list_literal_is_growable_test.dart
list_literal_test.dart
list_map_test.dart [cfe] Update greatest closure of ? to Object? 2020-05-04 08:14:43 +00:00
list_remove_range_test.dart
list_removeat_test.dart [vm] Rename --null-safety option to --sound-null-safety 2020-07-09 01:37:23 +00:00
list_replace_range_test.dart [nnbd/test] Fix some strong mode tests. 2020-03-31 18:14:45 +00:00
list_reversed_test.dart [cfe] Update greatest closure of ? to Object? 2020-05-04 08:14:43 +00:00
list_set_all_test.dart
list_set_range_test.dart [tests] Removing List constructor usage in corelib tests. 2020-03-30 19:58:08 +00:00
list_sort_test.dart
list_sublist_test.dart
list_test.dart Fix list tests to not set length on non-nullable lists. 2020-07-15 00:45:43 +00:00
list_to_string2_test.dart [tests] Removing List constructor usage in corelib tests. 2020-03-30 19:58:08 +00:00
list_to_string_test.dart
list_unmodifiable_cast_test.dart
list_unmodifiable_test.dart
list_write_elements_test.dart
local_date_time_test.dart Spelling tests 2022-12-19 12:56:47 +00:00
main_test.dart
map_contains_key_test.dart
map_contains_value_test.dart
map_entry_test.dart Convert from _JsonMap to Map<String, Object> in corelib/map_entry_test 2020-03-20 17:58:22 +00:00
map_from_entries_test.dart
map_from_iterable_test.dart
map_from_iterables_test.dart
map_from_test.dart
map_index_test.dart
map_keys2_test.dart
map_keys_test.dart
map_of_test.dart Make all CastErrors be TypeErrors. 2020-03-11 23:31:06 +00:00
map_remove_test.dart
map_set_undefined_test.dart [cfe] Report error on missing return from non-nullable function 2020-03-24 08:21:36 +00:00
map_test.dart Fix bug in VM _CompactHashIterable. 2023-07-04 11:00:50 +00:00
map_to_string_test.dart
map_unmodifiable_cast_test.dart Remove uses of : as default value separator in some tests/ directories. 2022-09-07 14:49:17 +00:00
map_update_test.dart Clean up a number of 2.19 opt outs in language tests. 2023-03-17 16:17:50 +00:00
map_values2_test.dart
map_values3_test.dart
map_values4_test.dart
map_values_test.dart
nan_infinity_test.dart
nsm_invocation_generic_test.dart
nsm_invocation_test.dart
null_closurized_method_tostring_test.dart Test for #48322 2022-02-16 01:32:14 +00:00
null_nosuchmethod_test.dart [vm] Reland "Remove non-covariant checks from closure bodies (part 1)" 2020-07-21 10:00:41 +00:00
null_test.dart
num_clamp_test.dart
num_parse_test.dart Fix year and comma in header. 2023-02-08 17:45:40 +00:00
num_sign_test.dart
num_try_parse_test.dart Fix year and comma in header. 2023-02-08 17:45:40 +00:00
object_hash_test.dart Spelling tests 2022-12-19 12:56:47 +00:00
range_error_test.dart Deprecate checkValidIndex and avoid using it in the core library. 2022-11-08 19:02:35 +00:00
reg_exp1_test.dart
reg_exp5_test.dart
reg_exp_all_matches_test.dart Rename is{Strong,Weak}Mode to has{Sound,Unsound}NullSafety 2020-11-05 14:26:53 +00:00
reg_exp_cache_test.dart
reg_exp_first_match_test.dart
reg_exp_group_test.dart
reg_exp_groups_test.dart
reg_exp_has_match_test.dart
reg_exp_pattern_test.dart
reg_exp_receive_port_test.dart [vm/regexp] Ensure regex sent in a message can be used by the receiver. 2021-06-09 02:50:50 +00:00
reg_exp_start_end_test.dart
reg_exp_string_match_test.dart
regress_11099_test.dart
regress_33166_test.dart
regress_42011_test.dart [vm/corelib] Fix ConcurrentModificationError for empty addAll. 2020-11-25 12:01:44 +00:00
regress_42502_test.dart [vm/corelib/nnbd] Fix null check in _GrowableList.length= 2020-06-30 17:14:14 +00:00
regress_45473_test.dart Fix null-safety migration error in CastMap. 2021-05-10 14:15:07 +00:00
regress_r21715_test.dart
safe_to_string_test.dart
set_contains_test.dart
set_containsAll_test.dart
set_intersection_test.dart
set_iterator_test.dart [cfe] Report error on missing return from non-nullable function 2020-03-24 08:21:36 +00:00
set_remove_test.dart
set_removeAll_test.dart
set_retainAll_test.dart
set_test.dart [corelib] Add Set.unmodifiable backed by an UnmodifiableSetView 2020-12-10 11:00:27 +00:00
set_to_string_test.dart
set_unmodifiable_view_test.dart [corelib] Add Set.unmodifiable backed by an UnmodifiableSetView 2020-12-10 11:00:27 +00:00
shuffle_test.dart Fixed various typos in a lot of files 2022-07-25 12:21:59 +00:00
sort_helper.dart [tests] Removing more List constructor usage in corelib tests. 2020-04-06 19:17:54 +00:00
sort_test.dart
splay_tree_from_iterable_test.dart
splay_tree_from_iterables_test.dart
splay_tree_test.dart Add efficient entries and keys.contains to SplayTreeMap. 2021-03-22 13:20:13 +00:00
stacktrace_current_test.dart [tests] Update a test for dart2wasm 2022-12-14 13:41:46 +00:00
stacktrace_fromstring_test.dart [cfe] Handle throw in return type inference 2020-03-27 15:59:27 +00:00
stopwatch2_test.dart
stopwatch_test.dart
string_base_vm_static_test.dart Migrate corelib and lib tests off @compile-error. 2023-04-20 19:19:01 +00:00
string_base_vm_test.dart [tests] Removing List constructor usage in corelib tests. 2020-03-30 19:58:08 +00:00
string_buffer_test.dart
string_case_test.dart Spelling tests 2022-12-19 12:56:47 +00:00
string_codeunits_test.dart
string_from_environment2_test.dart
string_from_environment3_test.dart
string_from_environment_test.dart Reland "[ CLI ] Improved consistency of -D and --define across tools and commands" 2021-02-05 23:53:28 +00:00
string_from_list_test.dart [tests] Removing List constructor usage in corelib tests. 2020-03-30 19:58:08 +00:00
string_fromcharcode_test.dart
string_fromcharcodes_test.dart
string_operations_with_null_test.dart [vm/nnbd] Fix CompileType::IsAssignableTo for nullable types in strong mode 2020-03-25 17:32:02 +00:00
string_operator_multiply_test.dart [runtime] Avoid SIGSEGV on String.* 2022-06-19 17:02:41 +00:00
string_pattern_test.dart
string_replace_all_2_test.dart
string_replace_all_common.dart Fix typos 2022-05-24 09:10:51 +00:00
string_replace_all_pattern_test.dart Add tests for String.replaceAll with general Pattern 2022-01-13 20:52:33 +00:00
string_replace_all_test.dart Add tests for String.replaceAll with general Pattern 2022-01-13 20:52:33 +00:00
string_replace_dollar_test.dart
string_replace_static_test.dart Migrate corelib and lib tests off @compile-error. 2023-04-20 19:19:01 +00:00
string_replace_test.dart Fix typos 2022-05-24 09:10:51 +00:00
string_runes_test.dart
string_source_test.dart
string_split_test.dart
string_static_test.dart Migrate corelib and lib tests off @compile-error. 2023-04-20 19:19:01 +00:00
string_substring_test.dart
string_test.dart Fix typos 2022-05-24 09:10:51 +00:00
string_to_lower_case_test.dart
string_trim2_test.dart
string_trim_test.dart
string_trimlr_test.dart
strings_test.dart
symbol_arbitrary_string_test.dart Remove references to dartfmt in various comments and docs. 2021-10-01 00:56:14 +00:00
symbol_map_helper.dart [test] Fix various static errors in corelib tests 2020-04-16 09:20:21 +00:00
symbol_operator_test.dart Adjust symbol tests to new semantics 2021-07-01 18:43:14 +00:00
symbol_reserved_word_error_test.dart Correct symbol_reserved_word_test.dart, splitting it into two tests. 2021-06-01 15:55:03 +00:00
symbol_reserved_word_test.dart Correct symbol_reserved_word_test.dart, splitting it into two tests. 2021-06-01 15:55:03 +00:00
symbol_test.dart Adjust symbol tests to new semantics 2021-07-01 18:43:14 +00:00
throw_half_surrogate_pair_test.dart
toInt_test.dart
type_hashcode_test.dart
type_tostring_test.dart Fix corelib/type_tostring_test.dart 2021-04-16 07:33:57 +00:00
typed_data_with_limited_ints_test.dart
unicode2_test.dart
unicode_test.dart
unsigned_shift_test.dart Spelling tests 2022-12-19 12:56:47 +00:00
uri_base_test.dart Replace Uri.scheme == with Uri.isScheme 2022-02-08 21:38:57 +00:00
uri_file_test.dart Remove uses of : as default value separator in some tests/ directories. 2022-09-07 14:49:17 +00:00
uri_http_test.dart Make path argument optional for Uri.http(s) 2022-06-03 18:07:27 +00:00
uri_ipv4_test.dart
uri_ipv6_test.dart Fixed various typos in a lot of files 2022-07-25 12:21:59 +00:00
uri_normalize_path_test.dart
uri_normalize_test.dart
uri_parameters_all_test.dart
uri_parse_test.dart
uri_path_test.dart
uri_query_test.dart
uri_scheme_test.dart
uri_test.dart Spelling tests 2023-01-19 16:24:29 +00:00
very_big_integer_test.dart [vm, compiler] Fix size of sign-extension in x64c BigInt intrinsics. 2021-06-03 22:47:56 +00:00