소스 검색

test: improve proper test so it generates more cases

Kjell Winblad 2 년 전
부모
커밋
37f42a486c
1개의 변경된 파일4개의 추가작업 그리고 4개의 파일을 삭제
  1. 4 4
      apps/emqx_rule_engine/test/emqx_rule_funcs_SUITE.erl

+ 4 - 4
apps/emqx_rule_engine/test/emqx_rule_funcs_SUITE.erl

@@ -959,7 +959,7 @@ prop_format_date_fun() ->
     Args1 = [<<"second">>, <<"+07:00">>, <<"%m--%d--%y---%H:%M:%S%Z">>],
     Args1 = [<<"second">>, <<"+07:00">>, <<"%m--%d--%y---%H:%M:%S%Z">>],
     ?FORALL(
     ?FORALL(
         S,
         S,
-        erlang:system_time(second),
+        range(0, 4000000000),
         S ==
         S ==
             apply_func(
             apply_func(
                 date_to_unix_ts,
                 date_to_unix_ts,
@@ -975,7 +975,7 @@ prop_format_date_fun() ->
     Args2 = [<<"millisecond">>, <<"+04:00">>, <<"--%m--%d--%y---%H:%M:%S%Z">>],
     Args2 = [<<"millisecond">>, <<"+04:00">>, <<"--%m--%d--%y---%H:%M:%S%Z">>],
     ?FORALL(
     ?FORALL(
         S,
         S,
-        erlang:system_time(millisecond),
+        range(0, 4000000000),
         S ==
         S ==
             apply_func(
             apply_func(
                 date_to_unix_ts,
                 date_to_unix_ts,
@@ -991,7 +991,7 @@ prop_format_date_fun() ->
     Args = [<<"second">>, <<"+08:00">>, <<"%y-%m-%d-%H:%M:%S%Z">>],
     Args = [<<"second">>, <<"+08:00">>, <<"%y-%m-%d-%H:%M:%S%Z">>],
     ?FORALL(
     ?FORALL(
         S,
         S,
-        erlang:system_time(second),
+        range(0, 4000000000),
         S ==
         S ==
             apply_func(
             apply_func(
                 date_to_unix_ts,
                 date_to_unix_ts,
@@ -1009,7 +1009,7 @@ prop_format_date_fun() ->
     ArgsOffset = [<<"second">>, <<"+08:00">>, <<"%y-%m-%d-%H:%M:%S%Z">>],
     ArgsOffset = [<<"second">>, <<"+08:00">>, <<"%y-%m-%d-%H:%M:%S%Z">>],
     ?FORALL(
     ?FORALL(
         S,
         S,
-        erlang:system_time(second),
+        range(0, 4000000000),
         S ==
         S ==
             apply_func(
             apply_func(
                 date_to_unix_ts,
                 date_to_unix_ts,