module Once where import Test.QuickCheck import Generics.Regular.Rewriting import Base onceTests = [ onceTopLevelTest1, onceTopLevelTest2 , onceTest1, onceTest2, onceTest3 ] onceTopLevelTest1 = label "onceTopLevel" $ once (applyRuleM notTRule) (Not T) == Just F onceTopLevelTest2 = label "onceTopLevel" $ once (applyRuleM notTRule) (Not F) == Nothing onceTest1 = label "once" $ once (applyRuleM notTRule) (Not T :&&: Not T) == Just (F :&&: Not T) onceTest2 = label "once" $ once (applyRuleM notTRule) (Not F :&&: Not T) == Just (Not F :&&: F) onceTest3 = label "once" $ once (applyRuleM notTRule) (Not F :&&: Not F) == Nothing