module Control.DFST.LensTest where import Prelude hiding (init) import Control.DFST import Control.DFST.Lens import Control.FST hiding (stInitial, stTransition, stAccept) import Data.Set (Set) import qualified Data.Set as Set import Data.Map.Strict (Map) import qualified Data.Map.Strict as Map import Data.Sequence (Seq) import qualified Data.Sequence as Seq import Data.Maybe (maybeToList) import Test.Tasty import Test.Tasty.Hedgehog import Test.Tasty.HUnit hiding (assert) import Hedgehog import qualified Hedgehog.Gen as G import qualified Hedgehog.Range as R import Numeric.Natural import Control.DFSTTest hprop_applyDivInit :: Property hprop_applyDivInit = property $ do word <- Seq.fromList <$> forAll genWord init @(StringEdits Natural) `apply` (divInit word :: StringEdits Natural) === Just word