gmbytecode/quickcheck/gmb_fate_encoding_tests.erl
Craig Everett 1cdcb9150b
All checks were successful
Gajumaru Bytecode Tests / tests (push) Successful in -3m34s
Revamp (#235)
Add Gitea tests
Rename
Remove oracle references
Package for zx

Reviewed-on: #235
Reviewed-by: dimitar.p.ivanov <dimitarivanov@qpq.swiss>
Co-authored-by: Craig Everett <zxq9@zxq9.com>
Co-committed-by: Craig Everett <zxq9@zxq9.com>
2025-01-22 21:12:54 +09:00

28 lines
917 B
Erlang

%%% @author Thomas Arts
%%% @doc Allow to run QuickCheck tests as eunit tests
%%% `rebar3 as eqc eunit --cover`
%%% or `rebar3 as eqc eunit --module=gmb_fate_encoding`
%%% Note that for obtaining cover file, one needs `rebar3 as eqc cover
%%%
%%%
%%% @end
%%% Created : 13 Dec 2018 by Thomas Arts
-module(gmb_fate_encoding_tests).
-include_lib("eunit/include/eunit.hrl").
-compile([export_all, nowarn_export_all]).
-define(EQC_EUNIT(Module, PropName, Ms),
{ atom_to_list(PropName),
{timeout, (Ms * 3) / 1000, ?_assert(eqc:quickcheck(eqc:testing_time(Ms / 1000, Module:PropName())))}}).
quickcheck_test_() ->
{setup, fun() -> eqc:start() end,
[ ?EQC_EUNIT(gmfate_type_eqc, prop_roundtrip, 1000),
?EQC_EUNIT(gmfate_eqc, prop_serializes, 1000),
?EQC_EUNIT(gmfate_eqc, prop_no_maps_in_keys, 1000),
?EQC_EUNIT(gmfate_eqc, prop_idempotent, 1000)
]}.