summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorStephen Paul Weber <singpolyma@singpolyma.net>2012-04-27 12:30:58 -0500
committerStephen Paul Weber <singpolyma@singpolyma.net>2012-04-27 12:30:58 -0500
commit322b24671707c5dc73c51949731f6e5e28948553 (patch)
tree2d88b696f88d89b5ba9f7b4ef7986cda9faa17bc /Makefile
parentc45d72cdb08ab9f1f362910c7be9205ce282e934 (diff)
Autogenerated Arbitrary instances for tests
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 7 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 2d9b719..105780e 100644
--- a/Makefile
+++ b/Makefile
@@ -19,9 +19,15 @@ debian: debian/control
19test: tests/suite 19test: tests/suite
20 tests/suite 20 tests/suite
21 21
22tests/suite: tests/suite.hs Data/OpenPGP.hs Data/OpenPGP/Internal.hs 22tests/suite: tests/suite.hs Data/OpenPGP.hs Data/OpenPGP/Internal.hs Data/OpenPGP/Arbitrary.hs
23 ghc --make $(GHCFLAGS) -o $@ $^ 23 ghc --make $(GHCFLAGS) -o $@ $^
24 24
25Data/OpenPGP/Arbitrary.hs: Data/OpenPGP.hs
26 derive -d Arbitrary -m Data.OpenPGP.Arbitrary -iData.OpenPGP -iTest.QuickCheck -iTest.QuickCheck.Instances -iNumeric -iData.Char -iData.Word -o $@ $^
27 -printf ',s/SignaturePacket x1 x2 x3 x4 x5 x6 x7 x8 x9)$$/signaturePacket x1 x2 x3 x4 x5 x6 x7 x8)/g\n/signaturePacket/\n-d\nw\nq\n' | ed $@
28 -printf '/return (IssuerPacket/\n-d\ni\n 4 -> do x1 <- fmap (map toUpper . (`showHex` "")) (arbitrary :: Gen Word64)\n.\nw\nq\n' | ed $@
29 -printf '/return (UnsupportedSignatureSubpacket/\n-d\n.s/x1/105/g\n.s/x2/x1/g\nw\nq\n' | ed $@
30
25report.html: tests/suite.hs Data/OpenPGP.hs Data/OpenPGP/Internal.hs 31report.html: tests/suite.hs Data/OpenPGP.hs Data/OpenPGP/Internal.hs
26 -hlint $(HLINTFLAGS) --report $^ 32 -hlint $(HLINTFLAGS) --report $^
27 33