Commits

Maxim Moiseev  committed 29d6e46

using test suite support in cabal for unit tests

  • Participants
  • Parent commits 4c2ef61

Comments (0)

Files changed (2)

File src/evernote.cabal

 
 Cabal-version:       >=1.2
 
+Extra-source-files:
+  ../tests/Properties.hs
+
 Library
   Exposed-modules:    
                     Evernote.Network, Evernote.Enml
 --ghc-options: -Wall -Werror -fno-warn-unused-binds
   ghc-options: -Wall -fno-warn-unused-binds
 
+
+Test-suite tests
+  Type:              exitcode-stdio-1.0
+  Hs-source-dirs:    ../test
+  Main-is:           EvernoteTests.hs
+  Build-depends:       
+                      base >= 3
+                    , network
+                    , containers
+                    , bytestring
+                    , binary
+                    , thrift == 0.6.0
+                    , text
+                    , blaze-html >= 0.4.2.2
+                    , blaze-builder >= 0.3.0.2
+                    , xmlhtml >= 0.1.6
+                    , HUnit >= 1.2.4.2
+                    , test-framework
+                    , test-framework-hunit
+  
+  Hs-Source-Dirs:
+                    ., ../src/Evernote/Thrift, ../src

File test/evernote-tests.cabal

 
 Flag buildDemo
     description:    Build a demo app instead of test suite
-    default:        False
+    -- defaulting to True since unit tests are now handled by the main cabal
+    default:        True 
 
 Executable evernote-tests
   If flag(buildDemo)
                     , binary
                     , thrift == 0.6.0
                     , text
-                      , blaze-html >= 0.4.2.2
+                    , blaze-html >= 0.4.2.2
                     , blaze-builder >= 0.3.0.2
                     , xmlhtml >= 0.1.6
                     , HUnit >= 1.2.4.2