packages feed

avro-0.6.2.1: test/Avro/RecursiveSpec.hs

{-# LANGUAGE OverloadedStrings   #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Avro.RecursiveSpec
where

import Avro.Data.Recursive
import Data.Avro.Deriving

import Avro.TestUtils              (roundtripGen)
import HaskellWorks.Hspec.Hedgehog
import Hedgehog
import Test.Hspec

{- HLINT ignore "Redundant do"        -}

spec :: Spec
spec = describe "Avro.RecursiveSpec" $ do
  it "should roundtrip recursive type" $ require $ property $
    roundtripGen schema'Recursive recursiveGen

  it "should roundrip mutually recursive type" $ require $ property $
    roundtripGen schema'RecursiveA recursiveAGen