Module test

Source
Expand description

Helper test utils to test lattice implementation correctness.

Functions§

cartesian_power
Returns an iterator of N-length arrays containing all permutations of items (with replacement).
check_all
Helper which calls many other check_* functions in this module. See source code for which functions are called.
check_atomize_each
Check that the atomized lattice points re-merge to form the same original lattice point, for each item in items.
check_lattice_bimorphism
Checks that the LatticeBimorphism is valid, i.e. that merge distributes over both arguments of it.
check_lattice_default_is_bot
Asserts that IsBot is true for Default::default().
check_lattice_is_bot
Checks that the item which is bot is less than (or equal to) all other items.
check_lattice_is_top
Checks that the item which is top is greater than (or equal to) all other items.
check_lattice_morphism
Checks that the LatticeMorphism is valid, i.e. that merge distributes over it.
check_lattice_ord
Check that the lattice’s PartialOrd implementation agrees with the NaiveLatticeOrd partial order derived from Merge.
check_lattice_properties
Check lattice associativity, commutativity, and idempotence.
check_partial_ord_properties
Checks PartialOrd and PartialEq’s reflexivity, symmetry, transitivity, and duality.