|
16 | 16 | suite() -> |
17 | 17 | [{timetrap, {minutes, 10}}]. |
18 | 18 |
|
19 | | -init_per_suite(Config0) -> |
20 | | - AppBase = code:lib_dir(gradualizer), |
21 | | - Config = [ |
22 | | - {dynamic_suite_module, ?MODULE}, |
23 | | - {dynamic_suite_test_path, filename:join(AppBase, "test/should_pass")}, |
24 | | - {dynamic_test_template, should_pass_template} |
25 | | - ] ++ Config0, |
| 19 | +all() -> |
| 20 | + [{group, all_tests}]. |
| 21 | + |
| 22 | +groups() -> |
| 23 | + Opts = [ |
| 24 | + {dynamic_suite_module, ?MODULE}, |
| 25 | + {dynamic_suite_test_path, filename:join(code:lib_dir(gradualizer), "test/should_pass")}, |
| 26 | + {dynamic_test_template, should_pass_template} |
| 27 | + ], |
| 28 | + {ok, GeneratedTests} = gradualizer_dynamic_suite:reload(Opts), |
| 29 | + [{all_tests, [parallel], GeneratedTests}]. |
| 30 | + |
| 31 | +init_per_suite(Config) -> |
26 | 32 | {ok, _} = application:ensure_all_started(gradualizer), |
27 | | - ok = load_prerequisites(AppBase), |
28 | | - {ok, TestNames} = gradualizer_dynamic_suite:reload(Config), |
29 | | - case all_tests() of |
30 | | - TestNames -> ok; |
31 | | - _ -> ct:fail("Please update all_tests/0 to list all tests") |
32 | | - end, |
| 33 | + ok = load_prerequisites(code:lib_dir(gradualizer)), |
33 | 34 | Config. |
34 | 35 |
|
35 | 36 | load_prerequisites(AppBase) -> |
@@ -57,51 +58,5 @@ init_per_testcase(_TestCase, Config) -> |
57 | 58 | end_per_testcase(_TestCase, _Config) -> |
58 | 59 | ok. |
59 | 60 |
|
60 | | -all() -> |
61 | | - [{group, all_tests}]. |
62 | | - |
63 | | -groups() -> |
64 | | - [{all_tests, [parallel], all_tests()}]. |
65 | | - |
66 | | -all_tests() -> |
67 | | - [alias_in_pattern,andalso_any,ann_types,annotated_types,any, |
68 | | - any_doesnt_have_type_none_pass,any_pattern,bc_pass, |
69 | | - binary_exhaustiveness_checking,binary_in_union,binary_literal_pattern, |
70 | | - bitstring,block_scope,bool,bounded_funs, |
71 | | - call_intersection_function_with_union_arg_pass,'case', |
72 | | - case_of_record_with_user_defined,catch_expr_pass,covariant_map_keys_pass, |
73 | | - cyclic_otp_specs,erlang_error_args_none_pass,exhaustiveness_union_types, |
74 | | - factorial,float,flow,fun_capture,fun_spec,guard,guard_sequences_pass,if_expr, |
75 | | - imported,int,intersection_pass,intersection_with_any_pass,iodata,issue131,lc, |
76 | | - lc_generator_not_none,lc_var_binds_in_filters,list,list_concat_op_pass, |
77 | | - list_exhaustiveness_checking_regressions, |
78 | | - list_exhaustiveness_checking_regressions2, |
79 | | - list_exhaustiveness_checking_unreachable_clause_regression,list_infer_pass, |
80 | | - list_op_pass,listsspecs,map,map_as_argument_update,map_creation, |
81 | | - map_field_valid_update,map_infer_pass,map_passing_expr,map_passing_subtyping, |
82 | | - map_pattern,map_refinement,map_update,map_update_with_record_field, |
83 | | - messaging_pass,minimised_gradualizer_fmt,minus,module_info_higher_arity, |
84 | | - module_info_pass,named_fun_infer_pass,named_fun_pass,negate_none, |
85 | | - nested_pattern_match,non_neg_plus_pos_is_pos_pass,nonempty_cons, |
86 | | - nonempty_list_match_in_head_exhaustive,nonempty_string, |
87 | | - nonexhaustive_record_pattern,opaque,operator_pattern_pass,operator_subtypes, |
88 | | - other_module,pattern_bind_reuse,pattern_record,pattern_with_ty_vars, |
89 | | - poly_lists_map_constraints_pass,poly_lists_map_pass,poly_map_pattern, |
90 | | - poly_pass,poly_pass_infer,poly_pass_no_solve_constraints, |
91 | | - poly_union_lower_bound_pass,preludes,qlc_test,record_info,record_refinement, |
92 | | - record_union_pass,record_union_with_any_should_pass,record_var, |
93 | | - record_wildcard_pass,record_with_user_defined,records, |
94 | | - recursive_call_with_remote_union_return_type_pass,recursive_types_passing, |
95 | | - refine_comparison,refine_mismatch_using_guard_bifs,remote_types, |
96 | | - remote_types_pass,return_fun,rigid_type_variables,rigid_type_variables_pass, |
97 | | - scope,send_pass,sets_set,shortcut_ops_pass, |
98 | | - spec_and_fun_clause_intersection_pass,stuff_as_top,'try',try_expr,tuple, |
99 | | - tuple_union_pass,tuple_union_pat,tuple_union_pattern_pass,type_decl, |
100 | | - type_pattern,type_refinement_pass,type_variable,type_vars_term, |
101 | | - typed_record_field_access,unary_negate_union_with_user_type_pass,unary_plus, |
102 | | - underscore,user_type_in_pattern_body,user_types,var,var_fun,varbind_in_block, |
103 | | - varbind_in_case,varbind_in_function_head,varbind_in_lc,variable_binding, |
104 | | - variable_binding_leaks]. |
105 | | - |
106 | 61 | should_pass_template(_@File) -> |
107 | 62 | ?assertEqual(ok, gradualizer:type_check_file(_@File, [{form_check_timeout_ms, 2000}])). |
0 commit comments