mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 12:18:19 +00:00
Allow migrating reporting tests to failing parse tests
This commit is contained in:
parent
bb89344eaa
commit
a3071a8aea
116 changed files with 280 additions and 23 deletions
|
@ -125,12 +125,67 @@ mod test_parse {
|
|||
|
||||
// see tests/snapshots to see test input(.roc) and expected output(.result-ast)
|
||||
snapshot_tests! {
|
||||
fail/ability_demand_value_has_args.expr,
|
||||
fail/ability_demands_not_indented_with_first.expr,
|
||||
fail/ability_first_demand_not_indented_enough.expr,
|
||||
fail/ability_non_signature_expression.expr,
|
||||
fail/comment_with_tab.expr,
|
||||
fail/def_missing_final_expression.expr,
|
||||
fail/double_plus.expr,
|
||||
fail/elm_function_syntax.expr,
|
||||
fail/empty_or_pattern.expr,
|
||||
fail/error_inline_alias_argument_uppercase.expr,
|
||||
fail/error_inline_alias_not_an_alias.expr,
|
||||
fail/error_inline_alias_qualified.expr,
|
||||
fail/expression_indentation_end.expr,
|
||||
fail/if_guard_without_condition.expr,
|
||||
fail/if_missing_else.expr,
|
||||
fail/if_outdented_then.expr,
|
||||
fail/imports_missing_comma.header,
|
||||
fail/inline_hastype.expr,
|
||||
fail/invalid_operator.expr,
|
||||
fail/lambda_double_comma.expr,
|
||||
fail/lambda_extra_comma.expr,
|
||||
fail/lambda_leading_comma.expr,
|
||||
fail/lambda_missing_indent.expr,
|
||||
fail/list_double_comma.expr,
|
||||
fail/list_pattern_not_terminated.expr,
|
||||
fail/list_pattern_weird_indent.expr,
|
||||
fail/list_pattern_weird_rest_pattern.expr,
|
||||
fail/list_without_end.expr,
|
||||
fail/multi_no_end.expr,
|
||||
fail/pattern_binds_keyword.expr,
|
||||
fail/pattern_in_parens_end_comma.expr,
|
||||
fail/pattern_in_parens_end.expr,
|
||||
fail/pattern_in_parens_indent_open.expr,
|
||||
fail/pattern_in_parens_open.expr,
|
||||
fail/record_type_end.expr,
|
||||
fail/record_type_keyword_field_name.expr,
|
||||
fail/record_type_missing_comma.expr,
|
||||
fail/record_type_open_indent.expr,
|
||||
fail/record_type_open.expr,
|
||||
fail/record_type_tab.expr,
|
||||
fail/single_no_end.expr,
|
||||
fail/tag_union_end.expr,
|
||||
fail/tag_union_lowercase_tag_name.expr,
|
||||
fail/tag_union_open.expr,
|
||||
fail/tag_union_second_lowercase_tag_name.expr,
|
||||
fail/type_annotation_double_colon.expr,
|
||||
fail/type_apply_stray_dot.expr,
|
||||
fail/type_argument_arrow_then_nothing.expr,
|
||||
fail/type_argument_no_arrow.expr,
|
||||
fail/type_double_comma.expr,
|
||||
fail/type_in_parens_end.expr,
|
||||
fail/type_in_parens_start.expr,
|
||||
fail/type_inline_alias.expr,
|
||||
fail/unfinished_closure_pattern_in_parens.expr,
|
||||
fail/unicode_not_hex.expr,
|
||||
fail/weird_escape.expr,
|
||||
fail/when_missing_arrow.expr,
|
||||
fail/pattern_binds_keyword.expr,
|
||||
fail/when_outdented_branch.expr,
|
||||
fail/when_over_indented_int.expr,
|
||||
fail/when_over_indented_underscore.expr,
|
||||
fail/wild_case_arrow.expr,
|
||||
pass/ability_demand_signature_is_multiline.expr,
|
||||
pass/ability_multi_line.expr,
|
||||
pass/ability_single_line.expr,
|
||||
|
@ -139,6 +194,7 @@ mod test_parse {
|
|||
pass/add_with_spaces.expr,
|
||||
pass/annotated_record_destructure.expr,
|
||||
pass/annotated_tag_destructure.expr,
|
||||
pass/annotated_tuple_destructure.expr,
|
||||
pass/apply_parenthetical_tag_args.expr,
|
||||
pass/apply_tag.expr,
|
||||
pass/apply_three_args.expr,
|
||||
|
@ -149,6 +205,7 @@ mod test_parse {
|
|||
pass/basic_docs.expr,
|
||||
pass/basic_field.expr,
|
||||
pass/basic_tag.expr,
|
||||
pass/basic_tuple.expr,
|
||||
pass/basic_var.expr,
|
||||
pass/closure_with_underscores.expr,
|
||||
pass/comment_after_def.module,
|
||||
|
@ -157,6 +214,7 @@ mod test_parse {
|
|||
pass/comment_inside_empty_list.expr,
|
||||
pass/comment_with_non_ascii.expr,
|
||||
pass/crash.expr,
|
||||
pass/dbg.expr,
|
||||
pass/destructure_tag_assignment.expr,
|
||||
pass/empty_app_header.header,
|
||||
pass/empty_hosted_header.header,
|
||||
|
@ -168,13 +226,13 @@ mod test_parse {
|
|||
pass/equals_with_spaces.expr,
|
||||
pass/equals.expr,
|
||||
pass/expect_fx.module,
|
||||
pass/multiline_tuple_with_comments.expr,
|
||||
pass/dbg.expr,
|
||||
pass/expect.expr,
|
||||
pass/float_with_underscores.expr,
|
||||
pass/full_app_header_trailing_commas.header,
|
||||
pass/full_app_header.header,
|
||||
pass/function_effect_types.header,
|
||||
pass/function_with_tuple_ext_type.expr,
|
||||
pass/function_with_tuple_type.expr,
|
||||
pass/highest_float.expr,
|
||||
pass/highest_int.expr,
|
||||
pass/if_def.expr,
|
||||
|
@ -188,10 +246,6 @@ mod test_parse {
|
|||
pass/list_patterns.expr,
|
||||
pass/lowest_float.expr,
|
||||
pass/lowest_int.expr,
|
||||
pass/tuple_type.expr,
|
||||
pass/tuple_access_after_record.expr,
|
||||
pass/record_access_after_tuple.expr,
|
||||
pass/tuple_type_ext.expr,
|
||||
pass/malformed_ident_due_to_underscore.expr,
|
||||
pass/malformed_pattern_field_access.expr, // See https://github.com/roc-lang/roc/issues/399
|
||||
pass/malformed_pattern_module_name.expr, // See https://github.com/roc-lang/roc/issues/399
|
||||
|
@ -202,6 +256,7 @@ mod test_parse {
|
|||
pass/multi_backpassing.expr,
|
||||
pass/multi_char_string.expr,
|
||||
pass/multiline_string.expr,
|
||||
pass/multiline_tuple_with_comments.expr,
|
||||
pass/multiline_type_signature_with_comment.expr,
|
||||
pass/multiline_type_signature.expr,
|
||||
pass/multiple_fields.expr,
|
||||
|
@ -259,6 +314,7 @@ mod test_parse {
|
|||
pass/qualified_field.expr,
|
||||
pass/qualified_tag.expr,
|
||||
pass/qualified_var.expr,
|
||||
pass/record_access_after_tuple.expr,
|
||||
pass/record_destructure_def.expr,
|
||||
pass/record_func_type_decl.expr,
|
||||
pass/record_type_with_function.expr,
|
||||
|
@ -277,6 +333,10 @@ mod test_parse {
|
|||
pass/tag_pattern.expr,
|
||||
pass/ten_times_eleven.expr,
|
||||
pass/three_arg_closure.expr,
|
||||
pass/tuple_access_after_record.expr,
|
||||
pass/tuple_accessor_function.expr,
|
||||
pass/tuple_type_ext.expr,
|
||||
pass/tuple_type.expr,
|
||||
pass/two_arg_closure.expr,
|
||||
pass/two_backpassing.expr,
|
||||
pass/two_branch_when.expr,
|
||||
|
@ -291,7 +351,6 @@ mod test_parse {
|
|||
pass/underscore_backpassing.expr,
|
||||
pass/underscore_in_assignment_pattern.expr,
|
||||
pass/var_else.expr,
|
||||
pass/tuple_accessor_function.expr,
|
||||
pass/var_if.expr,
|
||||
pass/var_is.expr,
|
||||
pass/var_minus_two.expr,
|
||||
|
@ -299,8 +358,8 @@ mod test_parse {
|
|||
pass/var_when.expr,
|
||||
pass/when_if_guard.expr,
|
||||
pass/when_in_assignment.expr,
|
||||
pass/when_in_function.expr,
|
||||
pass/when_in_function_python_style_indent.expr,
|
||||
pass/when_in_function.expr,
|
||||
pass/when_in_parens_indented.expr,
|
||||
pass/when_in_parens.expr,
|
||||
pass/when_with_alternative_patterns.expr,
|
||||
|
@ -308,8 +367,8 @@ mod test_parse {
|
|||
pass/when_with_negative_numbers.expr,
|
||||
pass/when_with_numbers.expr,
|
||||
pass/when_with_records.expr,
|
||||
pass/function_with_tuple_type.expr,
|
||||
pass/function_with_tuple_ext_type.expr,
|
||||
pass/when_with_tuple_in_record.expr,
|
||||
pass/when_with_tuples.expr,
|
||||
pass/where_clause_function.expr,
|
||||
pass/where_clause_multiple_bound_abilities.expr,
|
||||
pass/where_clause_multiple_has_across_newlines.expr,
|
||||
|
@ -318,10 +377,6 @@ mod test_parse {
|
|||
pass/where_clause_on_newline.expr,
|
||||
pass/zero_float.expr,
|
||||
pass/zero_int.expr,
|
||||
pass/basic_tuple.expr,
|
||||
pass/when_with_tuples.expr,
|
||||
pass/when_with_tuple_in_record.expr,
|
||||
pass/annotated_tuple_destructure.expr,
|
||||
}
|
||||
|
||||
fn snapshot_test(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue