Permalink
Browse files

Reorganize tests subtree

--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
  • Loading branch information...
1 parent 3ec6771 commit a827b2ead3697c530ab9ba7dc96c7fa00de3d3c3 @bos committed Jun 29, 2012
View
@@ -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)$
File renamed without changes.
File renamed without changes.
@@ -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]
File renamed without changes.
@@ -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
@@ -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
@@ -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
@@ -1,5 +1,5 @@
{-# LANGUAGE BangPatterns #-}
-module Data.Text.Tests.SlowFunctions
+module Tests.SlowFunctions
(
indices
, splitOn
@@ -1,7 +1,7 @@
-- | Miscellaneous testing utilities
--
{-# LANGUAGE ScopedTypeVariables #-}
-module Data.Text.Tests.Utils
+module Tests.Utils
(
(=^=)
, withRedirect
@@ -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
View
@@ -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

0 comments on commit a827b2e

Please sign in to comment.