Skip to content

Commit

Permalink
Move tests
Browse files Browse the repository at this point in the history
- legacy tests now live in /test-legacy
- new tests live in /test
  • Loading branch information
curiousleo committed Apr 22, 2020
1 parent 0d4c8cd commit 19c08fd
Show file tree
Hide file tree
Showing 12 changed files with 34 additions and 34 deletions.
26 changes: 14 additions & 12 deletions random.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@ custom-setup
cabal-doctest >=1.0.6 && <1.1

library
exposed-modules: System.Random
, System.Random.Internal
, System.Random.Monad
exposed-modules:
System.Random
System.Random.Internal
System.Random.Monad

c-sources: cbits/CastFloatWord.cmm
default-language: Haskell2010
ghc-options: -Wall
Expand All @@ -40,16 +42,16 @@ library
mtl >=2.2 && <2.3,
splitmix >=0.0.3 && <0.1

test-suite legacy
test-suite legacy-test
type: exitcode-stdio-1.0
main-is: Legacy.hs
hs-source-dirs: tests
hs-source-dirs: test-legacy
other-modules:
Legacy.T7936
Legacy.TestRandomIOs
Legacy.TestRandomRs
Legacy.Random1283
Legacy.RangeTest
T7936
TestRandomIOs
TestRandomRs
Random1283
RangeTest

default-language: Haskell2010
ghc-options: -with-rtsopts=-M4M -Wno-deprecations
Expand All @@ -61,7 +63,7 @@ test-suite legacy
test-suite doctests
type: exitcode-stdio-1.0
main-is: doctests.hs
hs-source-dirs: tests
hs-source-dirs: test
default-language: Haskell2010
build-depends:
base >=4.10 && <5,
Expand All @@ -74,7 +76,7 @@ test-suite doctests
test-suite spec
type: exitcode-stdio-1.0
main-is: Spec.hs
hs-source-dirs: tests
hs-source-dirs: test
other-modules:
Spec.Range
Spec.Run
Expand Down
15 changes: 15 additions & 0 deletions test-legacy/Legacy.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
module Main (main) where

import qualified Random1283 as Random1283
import qualified RangeTest as RangeTest
import qualified T7936 as T7936
import qualified TestRandomIOs as TestRandomIOs
import qualified TestRandomRs as TestRandomRs

main :: IO ()
main = do
Random1283.main
RangeTest.main
T7936.main
TestRandomIOs.main
TestRandomRs.main
2 changes: 1 addition & 1 deletion tests/Legacy/Random1283.hs → test-legacy/Random1283.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module Legacy.Random1283 (main) where
module Random1283 (main) where

import Control.Concurrent
import Control.Monad
Expand Down
2 changes: 1 addition & 1 deletion tests/Legacy/RangeTest.hs → test-legacy/RangeTest.hs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{-# LANGUAGE CPP #-}

module Legacy.RangeTest (main) where
module RangeTest (main) where

import Control.Monad
import System.Random
Expand Down
2 changes: 1 addition & 1 deletion tests/Legacy/T7936.hs → test-legacy/T7936.hs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
-- $ cabal test T7936 --test-options="+RTS -M1M -RTS"
-- T7936: Heap exhausted;

module Legacy.T7936 where
module T7936 where

import System.Random (newStdGen)
import Control.Monad (replicateM_)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
-- $ cabal test TestRandomIOs --test-options="+RTS -M1M -RTS"
-- TestRandomIOs: Heap exhausted;

module Legacy.TestRandomIOs where
module TestRandomIOs where

import Control.Monad (replicateM)
import System.Random (randomIO)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
-- $ cabal test TestRandomRs --test-options="+RTS -M1M -RTS"
-- TestRandomRs: Heap exhausted;

module Legacy.TestRandomRs where
module TestRandomRs where

import Control.Monad (liftM)
import System.Random (randomRs, getStdGen)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
17 changes: 0 additions & 17 deletions tests/Legacy.hs

This file was deleted.

0 comments on commit 19c08fd

Please sign in to comment.