您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

25 行
783 B

  1. -module(jiffy_SUITE).
  2. -include_lib("proper/include/proper.hrl").
  3. -include_lib("proper_stdlib/include/proper_ct.hrl").
  4. -compile(export_all).
  5. all() -> proper_ct:testcases(?MODULE).
  6. init_per_testcase(tc_prop_foo, Config) ->
  7. [{proper, [{numtests, 1000}]} | Config].
  8. -type json_any() :: json_list()
  9. | json_dict()
  10. | json_number()
  11. | json_string()
  12. | json_null().
  13. -type json_list() :: list(json_any()).
  14. -type json_dict() :: {[{json_key(), json_any()}]}.
  15. -type json_key() :: binary().
  16. -type json_number() :: integer() | float().
  17. -type json_string() :: binary().
  18. -type json_null() :: null.
  19. prop_foo() ->
  20. ?FORALL(Data, json_any(),
  21. Data == jiffy:decode(jiffy:encode(Data))).