ganeti

Safe HaskellNone

Test.Ganeti.SlotMap

Contents

Description

Unittests for the SlotMap.

Synopsis

Documentation

genSlotLimit :: Gen IntSource

Generates a number typical for the limit of a Slot. Useful for constructing resource bounds when not directly constructing the relevant Slots.

type TestKey = StringSource

genTestKey :: Gen TestKeySource

Generates short strings used as SlotMap keys.

We limit ourselves to a small set of key strings with high probability to increase the chance that SlotMaps actually have more than one slot taken.

genSlotMap :: Ord a => Gen a -> Gen (SlotMap a)Source

genCountMap :: Ord a => Gen a -> Gen (CountMap a)Source

overfullKeys :: Ord a => SlotMap a -> Set aSource

Tells which keys of a SlotMap are overfull.

genFittingSlotMap :: Ord a => Gen a -> Gen (SlotMap a)Source

Test cases

keyUnion :: Ord a => Map a b -> Map a c -> Set aSource