net-mqtt-0.7.1.0: 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
Eq SizeT Source # 
Instance details

Defined in Network.MQTT.Arbitrary

Methods

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

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

Show SizeT Source # 
Instance details

Defined in Network.MQTT.Arbitrary

Methods

showsPrec :: Int -> SizeT -> ShowS #

show :: SizeT -> String #

showList :: [SizeT] -> ShowS #

Arbitrary SizeT Source # 
Instance details

Defined in Network.MQTT.Arbitrary

Methods

arbitrary :: Gen SizeT #

shrink :: SizeT -> [SizeT] #

data ATopic Source #

An arbitrary topic.

Instances

Instances details
Eq ATopic Source # 
Instance details

Defined in Network.MQTT.Arbitrary

Methods

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

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

Show ATopic Source # 
Instance details

Defined in Network.MQTT.Arbitrary

Arbitrary ATopic Source # 
Instance details

Defined in Network.MQTT.Arbitrary

unTopic :: ATopic -> Topic Source #

Retrieve the Topic from ATopic

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 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.

v311mask :: MQTTPkt -> MQTTPkt Source #

v311mask strips all the v5 specific bits from an MQTTPkt.

Orphan instances

Arbitrary DisconnectRequest Source # 
Instance details

Arbitrary DiscoReason Source # 
Instance details

Arbitrary AuthRequest Source # 
Instance details

Arbitrary UnsubscribeResponse Source # 
Instance details

Arbitrary UnsubStatus Source # 
Instance details

Arbitrary UnsubscribeRequest Source # 
Instance details

Arbitrary SubErr Source # 
Instance details

Arbitrary SubscribeResponse Source # 
Instance details

Arbitrary PubCOMP Source # 
Instance details

Arbitrary PubREL Source # 
Instance details

Arbitrary PubREC Source # 
Instance details

Arbitrary PubACK Source # 
Instance details

Arbitrary SubscribeRequest Source # 
Instance details

Arbitrary SubOptions Source # 
Instance details

Arbitrary PublishRequest Source # 
Instance details

Arbitrary ConnACKFlags Source # 
Instance details

Arbitrary SessionReuse Source # 
Instance details

Arbitrary ConnACKRC Source # 
Instance details

Arbitrary MQTTPkt Source # 
Instance details

Arbitrary ConnectRequest Source # 
Instance details

Arbitrary LastWill Source # 
Instance details

Arbitrary ProtocolLevel Source # 
Instance details

Arbitrary Property Source # 
Instance details

Arbitrary QoS Source # 
Instance details

Methods

arbitrary :: Gen QoS #

shrink :: QoS -> [QoS] #