summaryrefslogtreecommitdiff
path: root/edit-lens/test/Control/DFST
diff options
context:
space:
mode:
Diffstat (limited to 'edit-lens/test/Control/DFST')
-rw-r--r--edit-lens/test/Control/DFST/LensTest.hs35
1 files changed, 35 insertions, 0 deletions
diff --git a/edit-lens/test/Control/DFST/LensTest.hs b/edit-lens/test/Control/DFST/LensTest.hs
new file mode 100644
index 0000000..46a1896
--- /dev/null
+++ b/edit-lens/test/Control/DFST/LensTest.hs
@@ -0,0 +1,35 @@
1module Control.DFST.LensTest where
2
3import Prelude hiding (init)
4
5import Control.DFST
6import Control.DFST.Lens
7import Control.FST hiding (stInitial, stTransition, stAccept)
8
9import Data.Set (Set)
10import qualified Data.Set as Set
11
12import Data.Map.Strict (Map)
13import qualified Data.Map.Strict as Map
14
15import Data.Sequence (Seq)
16import qualified Data.Sequence as Seq
17
18import Data.Maybe (maybeToList)
19
20import Test.Tasty
21import Test.Tasty.Hedgehog
22import Test.Tasty.HUnit hiding (assert)
23
24import Hedgehog
25import qualified Hedgehog.Gen as G
26import qualified Hedgehog.Range as R
27
28import Numeric.Natural
29
30import Control.DFSTTest
31
32hprop_applyDivInit :: Property
33hprop_applyDivInit = property $ do
34 word <- Seq.fromList <$> forAll genWord
35 init @(StringEdits Natural) `apply` (divInit word :: StringEdits Natural) === Just word