eqc_ex v1.3.0 EQC.StateM

This module contains macros to be used with Quviq QuickCheck. It defines Elixir versions of Erlang functions found in eqc/include/eqc_statem.hrl. For detailed documentation of the functions, please refer to the QuickCheck documentation.

Copyright (C) Quviq AB, 2014-2016.

Summary

Functions

Same as :eqc_statem.check_commands/3 but uses a keyword list with :history, :state, and :result instead of a tuple

Same as :eqc_statem.check_commands/4 but uses a keyword list with :history, :state, and :result instead of a tuple

Same as :eqc_statem.pretty_commands/4 but uses a keyword list with :history, :state, and :result instead of a tuple

Same as :eqc_statem.run_commands/2 but returns a keyword list with :history, :state, and :result instead of a tuple

Same as :eqc_statem.run_commands/3 but returns a keyword list with :history, :state, and :result instead of a tuple

Same as :eqc_statem.run_parallel_commands/2 but returns a keyword list with :history, :state, and :result instead of a tuple. Note that there is no actual final state in this case

Same as :eqc_statem.run_parallel_commands/3 but returns a keyword list with :history, :state, and :result instead of a tuple. Note that there is no actual final state in this case

Macros

Converts the given call expression into a symbolic call

Add weights to the commands in a statem specification

Functions

check_commands(mod, cmds, run_result)

Same as :eqc_statem.check_commands/3 but uses a keyword list with :history, :state, and :result instead of a tuple.

check_commands(mod, cmds, res, env)

Same as :eqc_statem.check_commands/4 but uses a keyword list with :history, :state, and :result instead of a tuple.

pretty_commands(mod, cmds, res, bool)

Same as :eqc_statem.pretty_commands/4 but uses a keyword list with :history, :state, and :result instead of a tuple.

run_commands(mod, cmds)

Same as :eqc_statem.run_commands/2 but returns a keyword list with :history, :state, and :result instead of a tuple.

run_commands(mod, cmds, env)

Same as :eqc_statem.run_commands/3 but returns a keyword list with :history, :state, and :result instead of a tuple.

run_parallel_commands(mod, cmds)

Same as :eqc_statem.run_parallel_commands/2 but returns a keyword list with :history, :state, and :result instead of a tuple. Note that there is no actual final state in this case.

run_parallel_commands(mod, cmds, env)

Same as :eqc_statem.run_parallel_commands/3 but returns a keyword list with :history, :state, and :result instead of a tuple. Note that there is no actual final state in this case.

Macros

symcall(arg)

Converts the given call expression into a symbolic call.

Examples

symcall extract_pid(result)
# {:call, __MODULE__, :extract_pid, [result]}

symcall OtherModule.do_something(result, args)
# {:call, OtherModule, :do_something, [result, args]}
weight(state, cmds)

Add weights to the commands in a statem specification

Example

weight _, take: 10, reset: 1
# Choose 10 times more 'take' than 'reset'

weight s, take: 10, reset: s
# The more tickets taken, the more likely reset becomes