Reorganize tests subtree
authorBryan O'Sullivan <bos@serpentine.com>
Fri, 29 Jun 2012 04:16:57 +0000 (21:16 -0700)
committerBryan O'Sullivan <bos@serpentine.com>
Fri, 29 Jun 2012 04:16:57 +0000 (21:16 -0700)
--HG--
rename : tests/tests/.ghci => tests/.ghci
rename : tests/tests/Makefile => tests/Makefile
rename : tests/tests/src/Data/Text/Tests.hs => tests/Tests.hs
rename : tests/tests/src/Data/Text/Tests/IO.hs => tests/Tests/IO.hs
rename : tests/tests/src/Data/Text/Tests/Properties.hs => tests/Tests/Properties.hs
rename : tests/tests/src/Data/Text/Tests/QuickCheckUtils.hs => tests/Tests/QuickCheckUtils.hs
rename : tests/tests/src/Data/Text/Tests/Regressions.hs => tests/Tests/Regressions.hs
rename : tests/tests/src/Data/Text/Tests/SlowFunctions.hs => tests/Tests/SlowFunctions.hs
rename : tests/tests/src/Data/Text/Tests/Utils.hs => tests/Tests/Utils.hs
rename : tests/tests/scripts/cover-stdio.sh => tests/scripts/cover-stdio.sh
rename : tests/tests/text-tests.cabal => tests/text-tests.cabal

13 files changed:
.hgignore
tests/.ghci [moved from tests/tests/.ghci with 100% similarity]
tests/Makefile [moved from tests/tests/Makefile with 100% similarity]
tests/Tests.hs [moved from tests/tests/src/Data/Text/Tests.hs with 64% similarity]
tests/Tests/IO.hs [moved from tests/tests/src/Data/Text/Tests/IO.hs with 100% similarity]
tests/Tests/Properties.hs [moved from tests/tests/src/Data/Text/Tests/Properties.hs with 99% similarity]
tests/Tests/QuickCheckUtils.hs [moved from tests/tests/src/Data/Text/Tests/QuickCheckUtils.hs with 98% similarity]
tests/Tests/Regressions.hs [moved from tests/tests/src/Data/Text/Tests/Regressions.hs with 96% similarity]
tests/Tests/SlowFunctions.hs [moved from tests/tests/src/Data/Text/Tests/SlowFunctions.hs with 97% similarity]
tests/Tests/Utils.hs [moved from tests/tests/src/Data/Text/Tests/Utils.hs with 98% similarity]
tests/scripts/cover-stdio.sh [moved from tests/tests/scripts/cover-stdio.sh with 100% similarity]
tests/text-tests.cabal [moved from tests/tests/text-tests.cabal with 72% similarity]
text.cabal

index 74777e1..c6204e6 100644 (file)
--- a/.hgignore
+++ b/.hgignore
@@ -1,4 +1,4 @@
-^(?:dist|benchmarks/dist|tests/tests/dist)$
+^(?:dist|benchmarks/dist|tests/dist)$
 ^benchmarks/.*\.txt$
 ^tests/text-testdata.tar.bz2$
 ^tests/(?:\.hpc|bm|qc|qc-hpc|stdio-hpc|text/test)$
similarity index 100%
rename from tests/tests/.ghci
rename to tests/.ghci
similarity index 100%
rename from tests/tests/Makefile
rename to tests/Makefile
similarity index 64%
rename from tests/tests/src/Data/Text/Tests.hs
rename to tests/Tests.hs
index 3bb1a51..fb97ff4 100644 (file)
@@ -6,8 +6,8 @@ module Main
 
 import Test.Framework (defaultMain)
 
-import qualified Data.Text.Tests.Properties as Properties
-import qualified Data.Text.Tests.Regressions as Regressions
+import qualified Tests.Properties as Properties
+import qualified Tests.Regressions as Regressions
 
 main :: IO ()
 main = defaultMain [Properties.tests, Regressions.tests]
similarity index 99%
rename from tests/tests/src/Data/Text/Tests/Properties.hs
rename to tests/Tests/Properties.hs
index ef6cb4a..f9fcfaf 100644 (file)
@@ -4,7 +4,7 @@
              ScopedTypeVariables, TypeSynonymInstances, CPP #-}
 {-# OPTIONS_GHC -fno-enable-rewrite-rules #-}
 {-# OPTIONS_GHC -fno-warn-missing-signatures #-}
-module Data.Text.Tests.Properties
+module Tests.Properties
     (
       tests
     ) where
@@ -46,9 +46,9 @@ import qualified Data.Text.Lazy.Search as S (indices)
 import qualified Data.Text.UnsafeShift as U
 import qualified System.IO as IO
 
-import Data.Text.Tests.QuickCheckUtils
-import Data.Text.Tests.Utils
-import qualified Data.Text.Tests.SlowFunctions as Slow
+import Tests.QuickCheckUtils
+import Tests.Utils
+import qualified Tests.SlowFunctions as Slow
 
 t_pack_unpack       = (T.unpack . T.pack) `eq` id
 tl_pack_unpack      = (TL.unpack . TL.pack) `eq` id
similarity index 98%
rename from tests/tests/src/Data/Text/Tests/QuickCheckUtils.hs
rename to tests/Tests/QuickCheckUtils.hs
index e6449ff..9add0b3 100644 (file)
@@ -1,10 +1,10 @@
 -- | This module provides quickcheck utilities, e.g. arbitrary and show
 -- instances, and comparison functions, so we can focus on the actual properties
--- in the 'Data.Text.Tests.Properties' module.
+-- in the 'Tests.Properties' module.
 --
 {-# LANGUAGE CPP, FlexibleInstances, TypeSynonymInstances #-}
 {-# OPTIONS_GHC -fno-warn-orphans #-}
-module Data.Text.Tests.QuickCheckUtils
+module Tests.QuickCheckUtils
     (
       genUnicode
     , unsquare
@@ -50,7 +50,7 @@ import qualified Data.Text.Lazy.Fusion as TLF
 import qualified Data.Text.Lazy.Internal as TL
 import qualified System.IO as IO
 
-import Data.Text.Tests.Utils
+import Tests.Utils
 
 instance Random I16 where
     randomR = integralRandomR
similarity index 96%
rename from tests/tests/src/Data/Text/Tests/Regressions.hs
rename to tests/Tests/Regressions.hs
index a80c616..4051add 100644 (file)
@@ -1,7 +1,7 @@
 -- | Regression tests for specific bugs.
 --
 {-# LANGUAGE OverloadedStrings, ScopedTypeVariables #-}
-module Data.Text.Tests.Regressions
+module Tests.Regressions
     (
       tests
     ) where
@@ -18,7 +18,7 @@ import qualified Data.Text.Lazy.Encoding as LE
 import qualified Test.Framework as F
 import qualified Test.Framework.Providers.HUnit as F
 
-import Data.Text.Tests.Utils (withTempFile)
+import Tests.Utils (withTempFile)
 
 -- Reported by Michael Snoyman: UTF-8 encoding a large lazy bytestring
 -- caused either a segfault or attempt to allocate a negative number
similarity index 97%
rename from tests/tests/src/Data/Text/Tests/SlowFunctions.hs
rename to tests/Tests/SlowFunctions.hs
index f6d21a1..2d0b9a3 100644 (file)
@@ -1,5 +1,5 @@
 {-# LANGUAGE BangPatterns #-}
-module Data.Text.Tests.SlowFunctions
+module Tests.SlowFunctions
     (
       indices
     , splitOn
similarity index 98%
rename from tests/tests/src/Data/Text/Tests/Utils.hs
rename to tests/Tests/Utils.hs
index ed828b5..34f9acc 100644 (file)
@@ -1,7 +1,7 @@
 -- | Miscellaneous testing utilities
 --
 {-# LANGUAGE ScopedTypeVariables #-}
-module Data.Text.Tests.Utils
+module Tests.Utils
     (
       (=^=)
     , withRedirect
similarity index 72%
rename from tests/tests/text-tests.cabal
rename to tests/text-tests.cabal
index d6c24fb..4996570 100644 (file)
@@ -4,7 +4,7 @@ synopsis:      Functional tests for the text package
 description:   Functional tests for the text package
 homepage:      https://bitbucket.org/bos/text
 license:       BSD3
-license-file:  ../../LICENSE
+license-file:  ../LICENSE
 author:        Jasper Van der Jeugt <jaspervdj@gmail.com>,
                Bryan O'Sullivan <bos@serpentine.com>,
                Tom Harper <rtomharper@googlemail.com>,
@@ -20,8 +20,7 @@ flag hpc
   default:     False
 
 executable text-tests
-  hs-source-dirs: src
-  main-is:        Data/Text/Tests.hs
+  main-is: Tests.hs
 
   ghc-options:
     -Wall -threaded -O0 -rtsopts
@@ -35,21 +34,20 @@ executable text-tests
     -DHAVE_DEEPSEQ
 
   build-depends:
-    text-tests,
-    base                       >= 4   && < 5,
-    bytestring                 >= 0.9,
-    deepseq                    >= 1.1,
-    directory                  >= 1.1 && < 1.2,
-    random                     >= 1.0 && < 1.1,
-    QuickCheck                 >= 2.4 && < 2.5,
-    HUnit                      >= 1.2 && < 1.3,
-    test-framework             >= 0.4 && < 0.5,
-    test-framework-quickcheck2 >= 0.2 && < 0.3,
-    test-framework-hunit       >= 0.2 && < 0.3
+    HUnit >= 1.2,
+    QuickCheck >= 2.4,
+    base == 4.*,
+    bytestring,
+    deepseq,
+    directory,
+    random,
+    test-framework >= 0.4,
+    test-framework-hunit >= 0.2,
+    test-framework-quickcheck2 >= 0.2,
+    text-tests
 
 executable text-tests-stdio
-  hs-source-dirs: src
-  main-is:        Data/Text/Tests/IO.hs
+  main-is:        Tests/IO.hs
 
   ghc-options:
     -Wall -threaded -rtsopts
@@ -64,8 +62,8 @@ executable text-tests-stdio
     base >= 4 && < 5
 
 library
-  hs-source-dirs: ../..
-  c-sources: ../../cbits/cbits.c
+  hs-source-dirs: ..
+  c-sources: ../cbits/cbits.c
   exposed-modules:
     Data.Text
     Data.Text.Array
@@ -117,8 +115,8 @@ library
 
   build-depends:
     array,
-    base        >= 4   && < 5,
-    bytestring  >= 0.9,
-    deepseq     >= 1.1,
-    integer-gmp >= 0.2 && < 0.3,
-    ghc-prim    >= 0.2 && < 0.3
+    base == 4.*,
+    bytestring,
+    deepseq,
+    ghc-prim,
+    integer-gmp
index 284bd5c..e039fc8 100644 (file)
@@ -61,12 +61,12 @@ extra-source-files:
     benchmarks/text-benchmarks.cabal
     scripts/*.hs
     tests/README.markdown
-    tests/tests/.ghci
-    tests/tests/Makefile
-    tests/tests/scripts/*.sh
-    tests/tests/src/Data/Text/*.hs
-    tests/tests/src/Data/Text/Tests/*.hs
-    tests/tests/text-tests.cabal
+    tests/.ghci
+    tests/Makefile
+    tests/scripts/*.sh
+    tests/src/Data/Text/*.hs
+    tests/src/Data/Text/Tests/*.hs
+    tests/text-tests.cabal
 
 flag developer
   description: operate in developer mode