Copyright | (c) Dustin Sallings 2019 |
---|---|
License | BSD3 |
Maintainer | dustin@spy.net |
Stability | experimental |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Network.MQTT.Arbitrary
Contents
Description
Arbitrary instances for QuickCheck.
Synopsis
- newtype SizeT = SizeT Int
- newtype MatchingTopic = MatchingTopic (Topic, [Filter])
- arbitraryTopicSegment :: [Char] -> Int -> Gen Text
- arbitraryTopic :: [Char] -> (Int, Int) -> (Int, Int) -> Gen Topic
- arbitraryFilter :: [Char] -> (Int, Int) -> (Int, Int) -> Gen Filter
- 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.
Constructors
MatchingTopic (Topic, [Filter]) |
Instances
Arbitrary MatchingTopic Source # | |
Defined in Network.MQTT.Arbitrary | |
Show MatchingTopic Source # | |
Defined in Network.MQTT.Arbitrary Methods showsPrec :: Int -> MatchingTopic -> ShowS # show :: MatchingTopic -> String # showList :: [MatchingTopic] -> ShowS # | |
Eq MatchingTopic Source # | |
Defined in Network.MQTT.Arbitrary Methods (==) :: MatchingTopic -> MatchingTopic -> Bool # (/=) :: MatchingTopic -> MatchingTopic -> Bool # |
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 Topic Source #
Generate an arbitrary Topic from the given alphabet with lengths of segments and the segment count specified by the given ranges.
arbitraryFilter :: [Char] -> (Int, Int) -> (Int, Int) -> Gen Filter Source #
Generate an arbitrary Filter from the given alphabet with lengths of segments and the segment count specified by the given ranges. Segments may contain wildcards.
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.
Orphan instances
Arbitrary Filter Source # | |
Arbitrary Topic Source # | |
Arbitrary AuthRequest Source # | |
Arbitrary ConnACKFlags Source # | |
Arbitrary ConnACKRC Source # | |
Arbitrary ConnectRequest Source # | |
Arbitrary DiscoReason Source # | |
Arbitrary DisconnectRequest Source # | |
Arbitrary LastWill Source # | |
Arbitrary MQTTPkt Source # | |
Arbitrary Property Source # | |
Arbitrary ProtocolLevel Source # | |
Arbitrary PubACK Source # | |
Arbitrary PubCOMP Source # | |
Arbitrary PubREC Source # | |
Arbitrary PubREL Source # | |
Arbitrary PublishRequest Source # | |
Arbitrary QoS Source # | |
Arbitrary SessionReuse Source # | |
Arbitrary SubErr Source # | |
Arbitrary SubOptions Source # | |
Arbitrary SubscribeRequest Source # | |
Arbitrary SubscribeResponse Source # | |
Arbitrary UnsubStatus Source # | |
Arbitrary UnsubscribeRequest Source # | |
Arbitrary UnsubscribeResponse Source # | |