Copyright | (c) Dustin Sallings 2019 |
---|---|
License | BSD3 |
Maintainer | dustin@spy.net |
Stability | experimental |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Arbitrary instances for QuickCheck.
Synopsis
- newtype SizeT = SizeT Int
- data ATopic
- unTopic :: ATopic -> Topic
- newtype MatchingTopic = MatchingTopic (Topic, [Filter])
- arbitraryTopicSegment :: [Char] -> Int -> Gen Text
- arbitraryTopic :: [Char] -> (Int, Int) -> (Int, Int) -> Gen ATopic
- arbitraryMatchingTopic :: [Char] -> (Int, Int) -> (Int, Int) -> (Int, Int) -> Gen (Topic, [Filter])
- v311mask :: MQTTPkt -> MQTTPkt
Documentation
Arbitrary type fitting variable integers.
newtype MatchingTopic Source #
An arbitrary Topic and an arbitrary Filter that should match it.
MatchingTopic (Topic, [Filter]) |
Instances
Eq MatchingTopic Source # | |
Defined in Network.MQTT.Arbitrary (==) :: MatchingTopic -> MatchingTopic -> Bool # (/=) :: MatchingTopic -> MatchingTopic -> Bool # | |
Show MatchingTopic Source # | |
Defined in Network.MQTT.Arbitrary showsPrec :: Int -> MatchingTopic -> ShowS # show :: MatchingTopic -> String # showList :: [MatchingTopic] -> ShowS # | |
Arbitrary MatchingTopic Source # | |
Defined in Network.MQTT.Arbitrary arbitrary :: Gen MatchingTopic # shrink :: MatchingTopic -> [MatchingTopic] # |
arbitraryTopicSegment :: [Char] -> Int -> Gen Text Source #
Generate an arbitrary topic segment (e.g. the X
in 'a/X/b') of a
given length from the given alphabet.
arbitraryTopic :: [Char] -> (Int, Int) -> (Int, Int) -> Gen ATopic Source #
Generate an arbitrary ATopic from the given alphabet with lengths of segments and the segment count specified by the given ranges.
arbitraryMatchingTopic :: [Char] -> (Int, Int) -> (Int, Int) -> (Int, Int) -> Gen (Topic, [Filter]) Source #
Generate an arbitrary topic similarly to arbitraryTopic as well as some arbitrary filters that should match that topic.