diff options
author | Stephen Paul Weber <singpolyma@singpolyma.net> | 2012-04-27 12:30:58 -0500 |
---|---|---|
committer | Stephen Paul Weber <singpolyma@singpolyma.net> | 2012-04-27 12:30:58 -0500 |
commit | 322b24671707c5dc73c51949731f6e5e28948553 (patch) | |
tree | 2d88b696f88d89b5ba9f7b4ef7986cda9faa17bc /Makefile | |
parent | c45d72cdb08ab9f1f362910c7be9205ce282e934 (diff) |
Autogenerated Arbitrary instances for tests
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -19,9 +19,15 @@ debian: debian/control | |||
19 | test: tests/suite | 19 | test: tests/suite |
20 | tests/suite | 20 | tests/suite |
21 | 21 | ||
22 | tests/suite: tests/suite.hs Data/OpenPGP.hs Data/OpenPGP/Internal.hs | 22 | tests/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 | ||
25 | Data/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 | |||
25 | report.html: tests/suite.hs Data/OpenPGP.hs Data/OpenPGP/Internal.hs | 31 | report.html: tests/suite.hs Data/OpenPGP.hs Data/OpenPGP/Internal.hs |
26 | -hlint $(HLINTFLAGS) --report $^ | 32 | -hlint $(HLINTFLAGS) --report $^ |
27 | 33 | ||