diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2018-12-18 13:51:16 +0100 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2018-12-18 13:51:16 +0100 |
commit | 46ae60eaca841b554ba20c6a2b7a15b43c12b4df (patch) | |
tree | 0bb06127a0e08e75f8be755f5a5dfb1702b627b6 /edit-lens/test/Control/DFST | |
parent | b0b18979d5ccd109d5a56937396acdeb85c857aa (diff) | |
download | incremental-dfsts-46ae60eaca841b554ba20c6a2b7a15b43c12b4df.tar incremental-dfsts-46ae60eaca841b554ba20c6a2b7a15b43c12b4df.tar.gz incremental-dfsts-46ae60eaca841b554ba20c6a2b7a15b43c12b4df.tar.bz2 incremental-dfsts-46ae60eaca841b554ba20c6a2b7a15b43c12b4df.tar.xz incremental-dfsts-46ae60eaca841b554ba20c6a2b7a15b43c12b4df.zip |
Much ado about nothing
Diffstat (limited to 'edit-lens/test/Control/DFST')
-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 | ||