Skip to content

Commit

Permalink
merging with haskell-package
Browse files Browse the repository at this point in the history
  • Loading branch information
tonymorris committed Nov 30, 2011
2 parents ca6e9a2 + 0522b17 commit acc5214
Show file tree
Hide file tree
Showing 70 changed files with 118 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .ghci
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
:set -isrc
:m + Test.QuickCheck
:l Course.hs
:m + Course
:set prompt ">> "
:set -Wall
Expand Down
22 changes: 11 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
syntax: glob
*.swp
*.*~
*.o
*.orig
*.hi
*.lkshs
*/.idea/ant.xml
*/.idea/workspace.xml
dist
out
syntax: glob
*.swp
*.*~
*.o
*.orig
*.hi
*.lkshs
*/.idea/ant.xml
*/.idea/workspace.xml
dist
out
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
9 changes: 9 additions & 0 deletions src/M.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module M where

add ::
Int
-> Int
-> Int
add =
(+)

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 6 additions & 0 deletions test/.ghci
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
:set -i../src -isrc
:m + Test.QuickCheck
:l Main
:set prompt "test>> "
:set -Wall

3 changes: 3 additions & 0 deletions test/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dist
*.tix
.hpc
39 changes: 39 additions & 0 deletions test/Package-Test.cabal
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
Name: Haskell-Package-Test
Version: 0.0.1
Author: Tony Morris <ʇǝu˙sıɹɹoɯʇ@ןןǝʞsɐɥ>
Maintainer: Tony Morris
Copyright: Tony Morris
Synopsis: A skeleton for testing haskell packages
Category: Development
Description: A skeleton for testing haskell packages
Homepage: https://github.com/tonymorris/haskell-package
Cabal-Version: >= 1.6
Build-Type: Simple

Source-Repository head
Type: git
Location: [email protected]:tonymorris/haskell-package.git

Flag small_base
Description: Choose the new, split-up base package.

Executable package-test
Hs-Source-Dirs:
../src src

Main-Is:
Main.hs

Ghc-Options:
-O2
-Wall
-fhpc
-fwarn-tabs

Build-Depends:
base < 5 && >= 3
, QuickCheck
, test-framework
, test-framework-quickcheck2
, test-framework-hunit

29 changes: 29 additions & 0 deletions test/src/M/Tests.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
module M.Tests
(
main
, test
) where

import Test.Framework
import Test.Framework.Providers.QuickCheck2 (testProperty)
import M

main ::
IO ()
main =
defaultMain [test]

test ::
Test
test =
testGroup "M"
[
testProperty "Right Identity" prop_right_identity
]

prop_right_identity ::
Int
-> Bool
prop_right_identity n =
n `add` 0 == n

20 changes: 20 additions & 0 deletions test/src/Main.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
module Main where

import qualified M.Tests
import Test.Framework

main ::
IO ()
main =
defaultMain tests

tests ::
[Test]
tests =
[
testGroup "Tests"
[
M.Tests.test
]
]

0 comments on commit acc5214

Please sign in to comment.