net-mqtt-0.8.2.4: An MQTT Protocol Implementation.
Copyright(c) Dustin Sallings 2019
LicenseBSD3
Maintainerdustin@spy.net
Stabilityexperimental
Safe HaskellSafe-Inferred
LanguageHaskell2010

Network.MQTT.Arbitrary

Description

Arbitrary instances for QuickCheck.

Synopsis

Documentation

newtype SizeT Source #

Arbitrary type fitting variable integers.

Constructors

SizeT Int 

Instances

Instances details
Arbitrary SizeT Source # 
Instance details

Defined in Network.MQTT.Arbitrary

Methods

arbitrary :: Gen SizeT #

shrink :: SizeT -> [SizeT] #

Show SizeT Source # 
Instance details

Defined in Network.MQTT.Arbitrary

Methods

showsPrec :: Int -> SizeT -> ShowS #

show :: SizeT -> String #

showList :: [SizeT] -> ShowS #

Eq SizeT Source # 
Instance details

Defined in Network.MQTT.Arbitrary

Methods

(==) :: SizeT -> SizeT -> Bool #

(/=) :: SizeT -> SizeT -> Bool #

newtype MatchingTopic Source #

An arbitrary Topic and an arbitrary Filter that should match it.

Constructors

MatchingTopic (Topic, [Filter]) 

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.

v311mask :: MQTTPkt -> MQTTPkt Source #

v311mask strips all the v5 specific bits from an MQTTPkt.

Orphan instances

Arbitrary Filter Source # 
Instance details

Arbitrary Topic Source # 
Instance details

Methods

arbitrary :: Gen Topic #

shrink :: Topic -> [Topic] #

Arbitrary AuthRequest Source # 
Instance details

Arbitrary ConnACKFlags Source # 
Instance details

Arbitrary ConnACKRC Source # 
Instance details

Arbitrary ConnectRequest Source # 
Instance details

Arbitrary DiscoReason Source # 
Instance details

Arbitrary DisconnectRequest Source # 
Instance details

Arbitrary LastWill Source # 
Instance details

Arbitrary MQTTPkt Source # 
Instance details

Arbitrary Property Source # 
Instance details

Arbitrary ProtocolLevel Source # 
Instance details

Arbitrary PubACK Source # 
Instance details

Arbitrary PubCOMP Source # 
Instance details

Arbitrary PubREC Source # 
Instance details

Arbitrary PubREL Source # 
Instance details

Arbitrary PublishRequest Source # 
Instance details

Arbitrary QoS Source # 
Instance details

Methods

arbitrary :: Gen QoS #

shrink :: QoS -> [QoS] #

Arbitrary SessionReuse Source # 
Instance details

Arbitrary SubErr Source # 
Instance details

Arbitrary SubOptions Source # 
Instance details

Arbitrary SubscribeRequest Source # 
Instance details

Arbitrary SubscribeResponse Source # 
Instance details

Arbitrary UnsubStatus Source # 
Instance details

Arbitrary UnsubscribeRequest Source # 
Instance details

Arbitrary UnsubscribeResponse Source # 
Instance details