TypeClass v1.2.0 TypeClass.Property View Source

A very simple prop checker

Link to this section Summary

Functions

Ensure that the type class has defined properties

Check for equality while handling special cases that normally don’t equate in Elixir. For example, only check float accuracy to 5 decimal places due to internal rounding mismatches from applying functions in differing order. This isn’t totally theoretically accurate, but is in line with the spirit of Floats

Run all properties for the type class

Link to this section Functions

Link to this macro ensure!() View Source (macro)
ensure!(term) :: no_return

Ensure that the type class has defined properties

Link to this function equal?(left, right) View Source
equal?(any, any) :: boolean

Check for equality while handling special cases that normally don’t equate in Elixir. For example, only check float accuracy to 5 decimal places due to internal rounding mismatches from applying functions in differing order. This isn’t totally theoretically accurate, but is in line with the spirit of Floats.

Link to this function run!(datatype, class, prop_name, times \\ 100) View Source
run!(module, module, atom, non_neg_integer) :: no_return

Run all properties for the type class