about summary refs log tree commit diff
path: root/scratch/brilliant/Spec.hs
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2020-08-05T23·15+0100
committerWilliam Carroll <wpcarro@gmail.com>2020-08-05T23·15+0100
commite14fff7d4b04c37155acf046b7b3f350cf6ad3b6 (patch)
tree501e9483218ee20559075e2243e474b56fcd77fe /scratch/brilliant/Spec.hs
parentd45685e2459df4c73702a854309646ae1e146eec (diff)
Support Transforms.optimize
Partially optimize inputs and document rules for further optimizations we can
make.
Diffstat (limited to 'scratch/brilliant/Spec.hs')
-rw-r--r--scratch/brilliant/Spec.hs7
1 files changed, 7 insertions, 0 deletions
diff --git a/scratch/brilliant/Spec.hs b/scratch/brilliant/Spec.hs
index d5ad6234ddc0..f2450bdd9a5c 100644
--- a/scratch/brilliant/Spec.hs
+++ b/scratch/brilliant/Spec.hs
@@ -71,3 +71,10 @@ main = hspec $ do
                    , Utils.rotate (-3) ['A','S','D','F','G','H','J','K','L',';']
                    , Utils.rotate (-3) ['Z','X','C','V','B','N','M',',','.','/']
                    ]
+
+  describe "Transforms.optimize" $ do
+    it "removes superfluous horizontal transformations" $ do
+      Transforms.optimize [HorizontalFlip, HorizontalFlip] == []
+
+    it "removes superfluous vertical transformations" $ do
+      Transforms.optimize [VerticalFlip, VerticalFlip] == []