Renamed the TestUtil and TreeUtil modules to TestUtils and TreeUtils, to be consistent with the Utils module
This commit is contained in:
parent
51d5d50d45
commit
26dd2fa5c4
|
@ -38,7 +38,7 @@ genHeader = [
|
|||
,""
|
||||
,"import qualified AST as A"
|
||||
,"import Pattern"
|
||||
,"import TreeUtil"
|
||||
,"import TreeUtils"
|
||||
-- Could probably auto-generate these, too:
|
||||
,"type F0 = Pattern"
|
||||
,"type F1 = (Data a0) => a0 -> Pattern"
|
||||
|
|
|
@ -56,7 +56,7 @@ tock_SOURCES_hs += transformations/Unnest.hs transformations/RainUsageCheck.hs t
|
|||
tock_SOURCES_hs += transformations/SimplifyComms.hs transformations/ArrayUsageCheck.hs
|
||||
tock_SOURCES_hs += frontends/PreprocessOccam.hs frontends/ParseRain.hs frontends/StructureOccam.hs
|
||||
tock_SOURCES_hs += frontends/ParseOccam.hs frontends/RainTypes.hs frontends/RainPasses.hs frontends/ParseUtils.hs
|
||||
tock_SOURCES_hs += common/Pass.hs common/TreeUtil.hs common/Intrinsics.hs common/EvalLiterals.hs
|
||||
tock_SOURCES_hs += common/Pass.hs common/TreeUtils.hs common/Intrinsics.hs common/EvalLiterals.hs
|
||||
tock_SOURCES_hs += common/Pattern.hs common/Errors.hs common/ShowCode.hs common/PrettyShow.hs
|
||||
tock_SOURCES_hs += common/EvalConstants.hs common/Utils.hs common/CompState.hs common/Types.hs
|
||||
tock_SOURCES_hs += common/Metadata.hs common/AST.hs common/FlowGraph.hs common/FlowAlgorithms.hs
|
||||
|
@ -71,7 +71,7 @@ tock_SOURCES = $(tock_SOURCES_hs) frontends/LexOccam.x frontends/LexRain.x
|
|||
tocktest_SOURCES = $(tock_SOURCES)
|
||||
tocktest_SOURCES += transformations/PassTest.hs transformations/RainUsageCheckTest.hs
|
||||
tocktest_SOURCES += backends/GenerateCTest.hs backends/BackendPassesTest.hs
|
||||
tocktest_SOURCES += common/TestUtil.hs common/CommonTest.hs common/FlowGraphTest.hs
|
||||
tocktest_SOURCES += common/TestUtils.hs common/CommonTest.hs common/FlowGraphTest.hs
|
||||
tocktest_SOURCES += frontends/ParseRainTest.hs frontends/RainPassesTest.hs frontends/RainTypesTest.hs
|
||||
tocktest_SOURCES += TestMain.hs
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ import qualified PassTest (tests)
|
|||
import qualified RainPassesTest (tests)
|
||||
import qualified RainTypesTest (tests)
|
||||
import qualified RainUsageCheckTest (qcTests)
|
||||
import TestUtil
|
||||
import TestUtils
|
||||
import Utils
|
||||
|
||||
-- We run all the HUnit tests before all the QuickCheck tests.
|
||||
|
|
|
@ -27,8 +27,8 @@ import Test.HUnit hiding (State)
|
|||
import qualified AST as A
|
||||
import BackendPasses
|
||||
import Pattern
|
||||
import TestUtil
|
||||
import TreeUtil
|
||||
import TestUtils
|
||||
import TreeUtils
|
||||
|
||||
-- | Test WaitUntil guard (should be unchanged)
|
||||
testTransformWaitFor0 :: Test
|
||||
|
|
|
@ -45,7 +45,7 @@ import Errors
|
|||
import GenerateC
|
||||
import GenerateCPPCSP
|
||||
import Metadata
|
||||
import TestUtil
|
||||
import TestUtils
|
||||
|
||||
-- | A few helper functions for writing certain characters (that won't appear in our generated C/C++ source)
|
||||
-- to the WriterT monad. Useful as simple placeholders/special values during testers.
|
||||
|
|
|
@ -26,7 +26,7 @@ import Test.HUnit hiding (State)
|
|||
|
||||
import qualified AST as A
|
||||
import Metadata
|
||||
import TreeUtil
|
||||
import TreeUtils
|
||||
import Types
|
||||
|
||||
-- | Tests the isSafeConversion function:
|
||||
|
|
|
@ -50,7 +50,7 @@ import Data.Graph.Inductive
|
|||
|
||||
import qualified AST as A
|
||||
import Metadata
|
||||
import TreeUtil
|
||||
import TreeUtils
|
||||
import Utils
|
||||
|
||||
-- | A node will either have zero links out, one or more Seq links, or one or more Par links.
|
||||
|
|
|
@ -37,7 +37,7 @@ import qualified AST as A
|
|||
import FlowGraph
|
||||
import Metadata
|
||||
import PrettyShow
|
||||
import TestUtil
|
||||
import TestUtils
|
||||
import Utils
|
||||
|
||||
-- | Makes a distinctive metatag for testing. The function is one-to-one.
|
||||
|
|
|
@ -30,7 +30,7 @@ import CompState
|
|||
import Errors
|
||||
import Metadata
|
||||
import PrettyShow
|
||||
import TreeUtil
|
||||
import TreeUtils
|
||||
|
||||
-- | The monad in which AST-mangling passes operate.
|
||||
type PassM = ErrorT ErrorReport (StateT CompState IO)
|
||||
|
|
|
@ -36,7 +36,7 @@ If they are not equal, it shows them (using 'show') with the given message prefi
|
|||
|
||||
-}
|
||||
|
||||
module TestUtil where
|
||||
module TestUtils where
|
||||
|
||||
import Control.Monad.Error
|
||||
import Control.Monad.State
|
||||
|
@ -52,7 +52,7 @@ import Metadata (Meta,emptyMeta)
|
|||
import Pass
|
||||
import Pattern
|
||||
import PrettyShow
|
||||
import TreeUtil
|
||||
import TreeUtils
|
||||
import Types
|
||||
import Utils
|
||||
|
|
@ -16,7 +16,7 @@ You should have received a copy of the GNU General Public License along
|
|||
with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
-}
|
||||
|
||||
module TreeUtil (
|
||||
module TreeUtils (
|
||||
MatchErrors,
|
||||
AnyDataItem(..), Items, castADI,
|
||||
assertPatternMatch, getMatchedItems,
|
|
@ -46,8 +46,8 @@ import qualified LexRain as L
|
|||
import Metadata (Meta,emptyMeta)
|
||||
import qualified ParseRain as RP
|
||||
import Pattern
|
||||
import TestUtil
|
||||
import TreeUtil
|
||||
import TestUtils
|
||||
import TreeUtils
|
||||
|
||||
data ParseTest a = Show a => ExpPass (String, RP.RainParser a , (a -> Assertion)) | ExpFail (String, RP.RainParser a)
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ import Metadata
|
|||
import Pass
|
||||
import Pattern
|
||||
import RainTypes
|
||||
import TreeUtil
|
||||
import TreeUtils
|
||||
import Types
|
||||
|
||||
-- | An ordered list of the Rain-specific passes to be run.
|
||||
|
|
|
@ -42,8 +42,8 @@ import Pattern
|
|||
import RainPasses
|
||||
import RainTypes
|
||||
import TagAST
|
||||
import TestUtil
|
||||
import TreeUtil
|
||||
import TestUtils
|
||||
import TreeUtils
|
||||
|
||||
-- | A helper function that returns a simple A.Structured item (A.OnlyP m $ A.Skip m).
|
||||
skipP :: A.Structured
|
||||
|
|
|
@ -31,8 +31,8 @@ import Pass
|
|||
import Pattern
|
||||
import RainTypes
|
||||
import TagAST
|
||||
import TestUtil
|
||||
import TreeUtil
|
||||
import TestUtils
|
||||
import TreeUtils
|
||||
import Types
|
||||
|
||||
-- | Tests that constants in expressions are folded properly. TODO these tests could do with a lot of expanding.
|
||||
|
|
|
@ -30,8 +30,8 @@ import Metadata
|
|||
import Pattern
|
||||
import SimplifyComms
|
||||
import SimplifyExprs
|
||||
import TestUtil
|
||||
import TreeUtil
|
||||
import TestUtils
|
||||
import TreeUtils
|
||||
|
||||
-- | A handy typed version of Nothing for use with A.Declaration
|
||||
noInit :: Maybe A.Expression
|
||||
|
|
|
@ -33,7 +33,7 @@ import qualified AST as A
|
|||
import FlowGraph
|
||||
import Metadata
|
||||
import RainUsageCheck
|
||||
import TestUtil
|
||||
import TestUtils
|
||||
import Utils
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user