From f4ff5075434b2d29d16d007e2e7afdcdf819b21e Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Wed, 19 Nov 2008 16:09:31 +0000 Subject: [PATCH] Moved wrapProcSeq into the TestUtils module --- checks/CheckTest.hs | 4 ---- common/TestUtils.hs | 6 ++++++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/checks/CheckTest.hs b/checks/CheckTest.hs index 9682f8e..0d3426c 100644 --- a/checks/CheckTest.hs +++ b/checks/CheckTest.hs @@ -26,10 +26,6 @@ import CheckFramework import Metadata import TestUtils -wrapProcSeq :: A.Structured A.Process -> A.AST -wrapProcSeq x = A.Spec emptyMeta (A.Specification emptyMeta (simpleName "foo") - $ A.Proc emptyMeta A.PlainSpec [] $ A.Seq emptyMeta x) (A.Several emptyMeta []) - testUnusedVar :: Test testUnusedVar = TestList [ diff --git a/common/TestUtils.hs b/common/TestUtils.hs index 339a38b..c1b7007 100644 --- a/common/TestUtils.hs +++ b/common/TestUtils.hs @@ -108,6 +108,12 @@ testCheck config property = --}}} --{{{ building AST fragments and patterns +-- | Wraps a structured process into a complete AST fragment. +wrapProcSeq :: A.Structured A.Process -> A.AST +wrapProcSeq x = A.Spec emptyMeta (A.Specification emptyMeta (simpleName "foo") + $ A.Proc emptyMeta A.PlainSpec [] $ A.Seq emptyMeta x) (A.Several emptyMeta []) + + -- | Helper function to generate an array dimension. dimension :: Int -> A.Dimension dimension n = makeDimension emptyMeta n