diff options
Diffstat (limited to 'edit-lens/test/Control/DFST/LensTest.hs')
-rw-r--r-- | edit-lens/test/Control/DFST/LensTest.hs | 35 |
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 @@ | |||
1 | module Control.DFST.LensTest where | ||
2 | |||
3 | import Prelude hiding (init) | ||
4 | |||
5 | import Control.DFST | ||
6 | import Control.DFST.Lens | ||
7 | import Control.FST hiding (stInitial, stTransition, stAccept) | ||
8 | |||
9 | import Data.Set (Set) | ||
10 | import qualified Data.Set as Set | ||
11 | |||
12 | import Data.Map.Strict (Map) | ||
13 | import qualified Data.Map.Strict as Map | ||
14 | |||
15 | import Data.Sequence (Seq) | ||
16 | import qualified Data.Sequence as Seq | ||
17 | |||
18 | import Data.Maybe (maybeToList) | ||
19 | |||
20 | import Test.Tasty | ||
21 | import Test.Tasty.Hedgehog | ||
22 | import Test.Tasty.HUnit hiding (assert) | ||
23 | |||
24 | import Hedgehog | ||
25 | import qualified Hedgehog.Gen as G | ||
26 | import qualified Hedgehog.Range as R | ||
27 | |||
28 | import Numeric.Natural | ||
29 | |||
30 | import Control.DFSTTest | ||
31 | |||
32 | hprop_applyDivInit :: Property | ||
33 | hprop_applyDivInit = property $ do | ||
34 | word <- Seq.fromList <$> forAll genWord | ||
35 | init @(StringEdits Natural) `apply` (divInit word :: StringEdits Natural) === Just word | ||