packages feed

hsnock 0.1.3 → 0.1.4

raw patch · 2 files changed

+11/−5 lines, 2 filesdep +test-frameworkdep +test-framework-quickcheck2

Dependencies added: test-framework, test-framework-quickcheck2

Files

hsnock.cabal view
@@ -1,5 +1,5 @@ name                 : hsnock-version              : 0.1.3+version              : 0.1.4 category             : Language license              : PublicDomain synopsis             : Nock 5K interpreter.@@ -35,4 +35,7 @@   main-is            : test.hs   build-depends      : base >=4.5 && <5                      , parsec >=3.1+                     , readline >=1.0                      , QuickCheck >=2.6+                     , test-framework >=0.8+                     , test-framework-quickcheck2 >=0.3
test.hs view
@@ -1,10 +1,12 @@ import Control.Applicative import Language.Nock5K+import Test.Framework+import Test.Framework.Providers.QuickCheck2 import Test.QuickCheck import Text.ParserCombinators.Parsec (parse) import Text.Printf -main = mapM_ (\(s,a) -> printf "%-25s: " s >> a) tests+main = defaultMain tests  instance Arbitrary Noun where   arbitrary = choose (0, 32) >>= arbD@@ -33,6 +35,7 @@     ifs c = Atom a :- Atom 6 :- (Atom 1 :- c) :- (Atom 4 :- Atom 0 :- Atom 1) :- (Atom 1 :- b)     a = abs a' -tests = [("parse_show", quickCheck prop_parse_show)-        ,("decrement", quickCheck prop_dec)-        ,("6_is_if", quickCheck prop_6_is_if)]+tests = [ testProperty "parse.show" prop_parse_show+        , testProperty "decrement"  prop_dec+        , testProperty "6_is_if"    prop_6_is_if+        ]