TypeClass v1.0.0-alpha7 TypeClass.Property

A very simple prop checker

Summary

Functions

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

Macros

Ensure that the type class has defined properties

Functions

equal?(left, right)
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.

run!(datatype, class, prop_name, times \\ 100)
run!(module, module, atom, non_neg_integer) :: no_return

Run all properties for the type class

Macros

ensure!()
ensure!(term) :: no_return

Ensure that the type class has defined properties