diff --git a/src/Swish/RDF/Graph.hs b/src/Swish/RDF/Graph.hs
--- a/src/Swish/RDF/Graph.hs
+++ b/src/Swish/RDF/Graph.hs
@@ -678,7 +678,7 @@
 
 -- The Data.Text API points out issues with processing a text
 -- character-by-character, but it's not clear to me how to avoid
--- that here
+-- that here.
 --
 -- One assumption would be that the strings aren't likely to be large,
 -- so that several calls to T.find or similar could be made to
@@ -700,7 +700,11 @@
 processChar '\r' = ("\\r", True)
 processChar '\t' = ("\\t", True)
 processChar '\b' = ("\\b", True)
-processChar '\f' = ("\\f", True)
+-- processChar '\f' = ("\\f", True)
+-- Using the above I get invalid output according to
+-- rapper version 2.0.9, so use the following for now
+-- (changed at version 0.9.0.6)
+processChar '\f' = ("\\u000C", True) -- 
 processChar c =
   let nc = ord c
       -- lazy ways to convert to hex-encoded strings
@@ -783,7 +787,11 @@
 --   At present the choice is between using one or three
 --   double quote (@"@) characters to surround the string; i.e. using
 --   single quote (@'@)  characters is not supported.
-
+-- 
+--   As of Swish 0.9.0.6, the @\f@ character is converted to
+--   @\u000C@ rather than left as is to aid interoperability
+--   with some other tools.
+--   
 quote :: 
   Bool  -- ^ @True@ if the string is to be displayed using one rather than three quotes.
   -> String -- ^ String to quote.
diff --git a/swish.cabal b/swish.cabal
--- a/swish.cabal
+++ b/swish.cabal
@@ -1,5 +1,5 @@
 Name:               swish
-Version:            0.9.0.5
+Version:            0.9.0.6
 Stability:          experimental
 License:            LGPL
 License-file:       LICENSE 
@@ -44,6 +44,13 @@
   .
   * Complete, ready-to-run, command-line and script-driven programs.
   .
+  Changes in version @0.9.0.6@:
+  .
+  * Turtle/N3 output: @\f@ characters in literals are converted to
+  @\u000C@ to work around some interoperability issues.
+  .
+  * Changed the test handling to use @test-framework@.
+  .
   Changes in version @0.9.0.5@:
   .
   * Turtle/N3 output: more changes for string literals containing
@@ -231,7 +238,9 @@
       base,
       containers,
       HUnit == 1.2.*,
-      swish
+      swish,
+      test-framework,
+      test-framework-hunit == 0.3.*
 
 Test-Suite test-graphpartition
    type:       exitcode-stdio-1.0
@@ -247,7 +256,9 @@
       containers,
       HUnit,
       semigroups,
-      swish
+      swish,
+      test-framework,
+      test-framework-hunit == 0.3.*
 
 Test-Suite test-graph
    type:       exitcode-stdio-1.0
@@ -263,7 +274,9 @@
       containers,
       hashable, 
       HUnit,
-      swish
+      swish,
+      test-framework,
+      test-framework-hunit == 0.3.*
 
 Test-Suite test-nt
    type:       exitcode-stdio-1.0
@@ -279,13 +292,14 @@
       containers,
       HUnit,
       swish,
+      test-framework,
+      test-framework-hunit == 0.3.*,
       text
 
 Test-Suite test-turtle
    type:       exitcode-stdio-1.0
    Hs-Source-Dirs: tests/
    Main-Is:        TurtleTest.hs
-   Other-Modules:  TestHelpers
 
    ghc-options:
       -Wall -fno-warn-orphans
@@ -296,6 +310,8 @@
       HUnit,
       network,
       swish,
+      test-framework,
+      test-framework-hunit == 0.3.*,
       text
 
 Test-Suite test-n3parser
@@ -313,6 +329,8 @@
       HUnit,
       network,
       swish,
+      test-framework,
+      test-framework-hunit == 0.3.*,
       text
 
 Test-Suite test-n3formatter
@@ -330,6 +348,8 @@
       HUnit,
       network,
       swish,
+      test-framework,
+      test-framework-hunit == 0.3.*,
       text
 
 Test-Suite test-rdfdatatypexsdinteger
@@ -347,6 +367,8 @@
       HUnit,
       network,
       swish,
+      test-framework,
+      test-framework-hunit == 0.3.*,
       text
 
 Test-Suite test-rdfgraph
@@ -365,6 +387,8 @@
       network,
       old-locale,
       swish,
+      test-framework,
+      test-framework-hunit == 0.3.*,
       text,
       time
 
@@ -383,6 +407,8 @@
       HUnit,
       network,
       swish,
+      test-framework,
+      test-framework-hunit == 0.3.*,
       text
 
 Test-Suite test-rdfproof
@@ -400,6 +426,8 @@
       HUnit,
       network,
       swish,
+      test-framework,
+      test-framework-hunit == 0.3.*,
       text
 
 Test-Suite test-rdfquery
@@ -417,6 +445,8 @@
       HUnit,
       network,
       swish,
+      test-framework,
+      test-framework-hunit == 0.3.*,
       text
 
 Test-Suite test-rdfruleset
@@ -434,6 +464,8 @@
       HUnit,
       network,
       swish,
+      test-framework,
+      test-framework-hunit == 0.3.*,
       text
 
 Test-Suite test-varbinding
@@ -449,7 +481,9 @@
       base,
       containers,
       HUnit,
-      swish
+      swish,
+      test-framework,
+      test-framework-hunit == 0.3.*
 
 Test-Suite test-qname
    type:       exitcode-stdio-1.0
@@ -466,6 +500,8 @@
       HUnit,
       network,
       swish,
+      test-framework,
+      test-framework-hunit == 0.3.*,
       text
 
  -- we do not have the data files to run this test
diff --git a/tests/BuiltInMapTest.hs b/tests/BuiltInMapTest.hs
--- a/tests/BuiltInMapTest.hs
+++ b/tests/BuiltInMapTest.hs
@@ -5,20 +5,24 @@
 --------------------------------------------------------------------------------
 -- |
 --  Module      :  BuiltInMapTest
---  Copyright   :  (c) 2003, Graham Klyne, 2009 Vasili I Galchin, 2011, 2012 Douglas Burke
+--  Copyright   :  (c) 2003, Graham Klyne, 2009 Vasili I Galchin, 2011, 2012, 2013 Douglas Burke
 --  License     :  GPL V2
---
+-- 
 --  Maintainer  :  Douglas Burke
 --  Stability   :  experimental
 --  Portability :  OverloadedStrings
---
+-- 
 --  This module contains test cases for accessing built-in variable
 --  binding modifiers.
---
+-- 
 --------------------------------------------------------------------------------
 
 module Main where
 
+import qualified Test.Framework as TF
+
+import qualified Data.Map as M
+
 import Swish.Namespace (makeNSScopedName)
 import Swish.Ruleset (getMaybeContextAxiom, getMaybeContextRule)
 
@@ -39,14 +43,12 @@
     , namespaceXsdType
     )
 
-import qualified Data.Map as M
-
 import Test.HUnit
     ( Test(TestCase,TestList)
     , assertEqual
     )
 
-import TestHelpers (runTestSuite, testJust)
+import TestHelpers (conv, testJust)
 
 ------------------------------------------------------------
 --  Test finding built-in variable binding modifiers
@@ -146,33 +148,22 @@
 --  All tests
 ------------------------------------------------------------
 
-allTests :: Test
-allTests = TestList
-    [ testVarModSuite
-    , testDatatypeSuite
-    , testRulesetSuite
-    , testFindAxiomSuite
-    , testFindRuleSuite
-    ]
+allTests :: [TF.Test]
+allTests =
+  [ conv "VarMod" testVarModSuite
+  , conv "Datatype" testDatatypeSuite
+  , conv "Ruleset" testRulesetSuite
+  , conv "FindAxiom" testFindAxiomSuite
+  , conv "FindRule" testFindRuleSuite
+  ]
 
 main :: IO ()
-main = runTestSuite allTests
-
-{-
-runTestFile :: Test -> IO ()
-runTestFile t = do
-    h <- openFile "a.tmp" WriteMode
-    _ <- runTestText (putTextToHandle h False) t
-    hClose h
-    
-tf = runTestFile
-tt = runTestTT
--}
+main = TF.defaultMain allTests
 
 --------------------------------------------------------------------------------
 --
 --  Copyright (c) 2003, Graham Klyne, 2009 Vasili I Galchin,
---    2011, 2012 Douglas Burke
+--    2011, 2012, 2013 Douglas Burke
 --  All rights reserved.
 --
 --  This file is part of Swish.
diff --git a/tests/GraphPartitionTest.hs b/tests/GraphPartitionTest.hs
--- a/tests/GraphPartitionTest.hs
+++ b/tests/GraphPartitionTest.hs
@@ -3,7 +3,7 @@
 --------------------------------------------------------------------------------
 -- |
 --  Module      :  GraphPartitionTest
---  Copyright   :  (c) 2003, Graham Klyne, 2009 Vasili I Galchin, 2011, 2012 Douglas Burke
+--  Copyright   :  (c) 2003, Graham Klyne, 2009 Vasili I Galchin, 2011, 2012, 2013 Douglas Burke
 --  License     :  GPL V2
 --
 --  Maintainer  :  Douglas Burke
@@ -16,6 +16,8 @@
 
 module Main where
 
+import qualified Test.Framework as TF
+
 import Swish.GraphPartition
     ( PartitionedGraph(..), getArcs
     , GraphPartition(..), node
@@ -29,10 +31,9 @@
 
 import Test.HUnit (Test(TestList))
 
-import TestHelpers (runTestSuite
-                    , testEq, testNe
+import TestHelpers (conv, testEq, testNe
                    , testEqv, testNotEqv
-                    )
+                   )
 
 ------------------------------------------------------------
 --  Basic GraphPartition tests
@@ -504,29 +505,20 @@
 --  All tests
 ------------------------------------------------------------
 
-allTests :: Test
-allTests = TestList
-    [ testBasicSuite
-    , testPartitionSuite
-    , testCompareSuite
-    ]
+allTests :: [TF.Test]
+allTests =
+  [ conv "basic" testBasicSuite
+  , conv "partiton" testPartitionSuite
+  , conv "compare" testCompareSuite
+  ]
 
 main :: IO ()
-main = runTestSuite allTests
-
-{-
-runTestFile t = do
-    h <- openFile "a.tmp" WriteMode
-    runTestText (putTextToHandle h False) t
-    hClose h
-tf = runTestFile
-tt = runTestTT
--}
+main = TF.defaultMain allTests
 
 --------------------------------------------------------------------------------
 --
 --  Copyright (c) 2003, Graham Klyne, 2009 Vasili I Galchin, 
---    2011, 2012 Douglas Burke
+--    2011, 2012, 2013 Douglas Burke
 --  All rights reserved.
 --
 --  This file is part of Swish.
diff --git a/tests/GraphTest.hs b/tests/GraphTest.hs
--- a/tests/GraphTest.hs
+++ b/tests/GraphTest.hs
@@ -3,7 +3,7 @@
 --------------------------------------------------------------------------------
 -- |
 --  Module      :  GraphTest
---  Copyright   :  (c) 2003, Graham Klyne, 2009 Vasili I Galchin, 2011, 2012 Douglas Burke
+--  Copyright   :  (c) 2003, Graham Klyne, 2009 Vasili I Galchin, 2011, 2012, 2013 Douglas Burke
 --  License     :  GPL V2
 --
 --  Maintainer  :  Douglas Burke
@@ -17,10 +17,11 @@
 module Main where
 
 import qualified Data.Foldable as F
+import qualified Data.Map as M
+import qualified Data.Set as S
 
-import Test.HUnit
-      ( Test(TestCase,TestList,TestLabel),
-        assertEqual, assertBool )
+import qualified Test.Framework as TF
+import qualified Test.Framework.Providers.HUnit as TF
 
 import Swish.GraphClass (Arc(..), ArcSet, LDGraph(..), Label(..))
 import Swish.GraphClass (arc, arcFromTriple, arcToTriple)
@@ -38,8 +39,6 @@
 
 -- import Swish.Utils.ListHelpers (subset)
 
-import TestHelpers (runTestSuite, testEq, testNe)
-
 import Data.Function (on)
 import Data.Hashable (hashWithSalt)
 import Data.List (sort, sortBy, elemIndex)
@@ -47,9 +46,13 @@
 import Data.Ord (comparing)
 import Data.Word (Word32)
 
-import qualified Data.Map as M
-import qualified Data.Set as S
+import Test.HUnit
+      ( Test(TestCase,TestList,TestLabel)
+        , (@=?)
+        , assertEqual, assertBool )
 
+import TestHelpers (conv, testEq, testNe)
+
 default ( Int )
 
 ------------------------------------------------------------
@@ -1853,50 +1856,35 @@
 -- All tests
 ------------------------------------------------------------
 
-allTests :: Test
-allTests = TestList
+allTests :: [TF.Test]
+allTests = 
   [ -- testSelectSuite
     -- testSubsetSuite
-    testLabSuite
-  , testGraphSuite
-  , testLabelEqSuite
-  , testLabelOrdSuite
-  , TestCase (assertBool "arc neq" (Arc True True True /= Arc True True False)) -- silly test of Eq instance
-  , testStmtEqSuite
-  , testLabelMapSuite
-  , testGraphMatchSupportSuite
-  , testGraphMatchStepSuite
-  , testGraphEqSuitePart
-  , testGraphEqSuite
-  , testGraphEqSuiteMore
+    conv "Lab" testLabSuite
+  , conv "Graph" testGraphSuite
+  , conv "LabelEq" testLabelEqSuite
+  , conv "LabelOrd" testLabelOrdSuite
+    -- silly test of Eq instance
+  , TF.testCase "arc neq"
+    (assertBool "arc neq" (Arc True True True /= Arc True True False))
+  , conv "StmtEq" testStmtEqSuite
+  , conv "LabelMap" testLabelMapSuite
+  , conv "GraphMatchSupport" testGraphMatchSupportSuite
+  , conv "GraphMatchStep" testGraphMatchStepSuite
+  , conv "GraphEq Part" testGraphEqSuitePart
+  , conv "GraphEq" testGraphEqSuite
+  , conv "GraphEq More" testGraphEqSuiteMore
     -- test of Foldable instance of Arc
-  , TestCase (assertEqual "fold Arc" [1::Int,2,4] (F.fold (Arc [1::Int] [2] [4])))
+  , TF.testCase "foldArc" ([1::Int,2,4] @=? F.fold (Arc [1::Int] [2] [4]))
   ]
 
 main :: IO ()
-main = runTestSuite allTests
-
-{-
-runTestFile t = do
-    h <- openFile "a.tmp" WriteMode
-    runTestText (putTextToHandle h False) t
-    hClose h
-tf = runTestFile
-tt = runTestTT
-
-geq    = testGraphEqSuite
-geq1   = testGraphEqSuiteMore
-ttmore = tt testGraphEqSuiteMore    -- this test may take a long time
-tfmore = tf testGraphEqSuiteMore
-ttstep = tt testGraphMatchStepSuite
-tfstep = tf testGraphMatchStepSuite
-
--}
+main = TF.defaultMain allTests
 
 --------------------------------------------------------------------------------
 --
 --  Copyright (c) 2003, Graham Klyne, 2009 Vasili I Galchin,
---    2011, 2012 Douglas Burke
+--    2011, 2012, 2013 Douglas Burke
 --  All rights reserved.
 --
 --  This file is part of Swish.
diff --git a/tests/N3FormatterTest.hs b/tests/N3FormatterTest.hs
--- a/tests/N3FormatterTest.hs
+++ b/tests/N3FormatterTest.hs
@@ -5,7 +5,7 @@
 --------------------------------------------------------------------------------
 -- |
 --  Module      :  N3FormatterTest
---  Copyright   :  (c) 2003, Graham Klyne, 2009 Vasili I Galchin, 2011, 2012 Douglas Burke
+--  Copyright   :  (c) 2003, Graham Klyne, 2009 Vasili I Galchin, 2011, 2012, 2013 Douglas Burke
 --  License     :  GPL V2
 --
 --  Maintainer  :  Douglas Burke
@@ -18,6 +18,14 @@
 
 module Main where
 
+import qualified Data.Map as M
+import qualified Data.Set as S
+import qualified Data.Text as T
+import qualified Data.Text.Lazy as L
+import qualified Data.Text.Lazy.Builder as B
+
+import qualified Test.Framework as TF
+
 import Swish.GraphClass (Arc, arc)
 import Swish.Namespace (Namespace, makeNamespace, getNamespaceTuple, makeNSScopedName, namespaceToBuilder)
 import Swish.QName (LName)
@@ -44,17 +52,11 @@
 
 import Data.String (IsString(..))
 
-import qualified Data.Map as M
-import qualified Data.Set as S
-import qualified Data.Text as T
-import qualified Data.Text.Lazy as L
-import qualified Data.Text.Lazy.Builder as B
-
 import Test.HUnit
     ( Test(TestCase,TestList)
     , assertEqual )
 
-import TestHelpers (runTestSuite, testCompareEq)
+import TestHelpers (conv, testCompareEq)
 
 -- Specialized equality comparisons
 
@@ -1503,31 +1505,22 @@
 --  All tests
 ------------------------------------------------------------
 
-allTests :: Test
-allTests = TestList
-  [ trivialTestSuite
-  , parseTestSuite
-  , roundTripTestSuite
-  , simpleTestSuite
-  , exoticTestSuite
+allTests :: [TF.Test]
+allTests = 
+  [ conv "trivial" trivialTestSuite
+  , conv "parse" parseTestSuite
+  , conv "roundtrip" roundTripTestSuite
+  , conv "simple" simpleTestSuite
+  , conv "exotic" exoticTestSuite
   ]
 
 main :: IO ()
-main = runTestSuite allTests
-
-{-
-runTestFile t = do
-    h <- openFile "a.tmp" WriteMode
-    runTestText (putTextToHandle h False) t
-    hClose h
-tf = runTestFile
-tt = runTestTT
--}
+main = TF.defaultMain allTests
 
 --------------------------------------------------------------------------------
 --
 --  Copyright (c) 2003, Graham Klyne, 2009 Vasili I Galchin,
---    2011, 2012 Douglas Burke
+--    2011, 2012, 2013 Douglas Burke
 --  All rights reserved.
 --
 --  This file is part of Swish.
diff --git a/tests/N3ParserTest.hs b/tests/N3ParserTest.hs
--- a/tests/N3ParserTest.hs
+++ b/tests/N3ParserTest.hs
@@ -5,7 +5,7 @@
 --------------------------------------------------------------------------------
 -- |
 --  Module      :  N3ParserTest
---  Copyright   :  (c) 2003, Graham Klyne, 2009 Vasili I Galchin, 2011, 2012 Douglas Burke
+--  Copyright   :  (c) 2003, Graham Klyne, 2009 Vasili I Galchin, 2011, 2012, 2013 Douglas Burke
 --  License     :  GPL V2
 --
 --  Maintainer  :  Douglas Burke
@@ -18,6 +18,14 @@
 
 module Main where
 
+import qualified Data.Map as M
+import qualified Data.Set as S
+import qualified Data.Text as T
+import qualified Data.Text.Lazy as L
+import qualified Data.Text.Lazy.Builder as B
+
+import qualified Test.Framework as TF
+
 import Swish.GraphClass (Arc, arc) 
 import Swish.Namespace (
   Namespace, makeNamespace, getNamespaceURI, getNamespaceTuple
@@ -62,13 +70,7 @@
 import Data.Maybe (fromJust, fromMaybe)
 import Data.List (intercalate)
 
-import qualified Data.Map as M
-import qualified Data.Set as S
-import qualified Data.Text as T
-import qualified Data.Text.Lazy as L
-import qualified Data.Text.Lazy.Builder as B
-
-import TestHelpers (runTestSuite, testCompareEq)
+import TestHelpers (conv, testCompareEq)
 
 -- Specialized equality comparisons
 
@@ -1472,27 +1474,27 @@
 --  All tests
 ------------------------------------------------------------
 
-allTests :: Test
-allTests = TestList
-  [ charTestSuite
-  , nameTestSuite
+allTests :: [TF.Test]
+allTests = 
+  [ conv "char" charTestSuite
+  , conv "name" nameTestSuite
   -- , prefixTestSuite
-  , absUriRefTestSuite
-  , uriRef2TestSuite
-  , simpleTestSuite
-  , litTestSuite
-  , exoticTestSuite
-  , keywordTestSuite
-  , failTestSuite
+  , conv "absUriRef" absUriRefTestSuite
+  , conv "uriRef2" uriRef2TestSuite
+  , conv "simple" simpleTestSuite
+  , conv "lit" litTestSuite
+  , conv "exotic" exoticTestSuite
+  , conv "keyword" keywordTestSuite
+  , conv "fail" failTestSuite
   ]
 
 main :: IO ()
-main = runTestSuite allTests
+main = TF.defaultMain allTests
 
 --------------------------------------------------------------------------------
 --
 --  Copyright (c) 2003, Graham Klyne, 2009 Vasili I Galchin,
---    2011, 2012 Douglas Burke
+--    2011, 2012, 2013 Douglas Burke
 --  All rights reserved.
 --
 --  This file is part of Swish.
diff --git a/tests/NTTest.hs b/tests/NTTest.hs
--- a/tests/NTTest.hs
+++ b/tests/NTTest.hs
@@ -18,6 +18,12 @@
 
 module Main where
 
+import qualified Data.Set as S
+import qualified Data.Text.Lazy as T
+
+import qualified Test.Framework as TF
+import qualified Test.Framework.Providers.HUnit as TF
+
 import Swish.GraphClass (arc)
 
 import Swish.RDF.Parser.NTriples (parseNT)
@@ -33,13 +39,12 @@
 
 import Test.HUnit
     ( Test(TestCase,TestList)
+    , (@=?)
     , assertEqual )
 
 import Data.Maybe (fromJust)
-import TestHelpers (runTestSuite)
 
-import qualified Data.Set as S
-import qualified Data.Text.Lazy as T
+import TestHelpers (conv)
 
 ------------------------------------------------------------
 --  Parser tests
@@ -82,7 +87,25 @@
     , TestCase (assertEqual ("roundTrip-graph:"++lbl)    pGr1    pGr2)
     ]
 
+roundTripTF :: String -> T.Text -> TF.Test
+roundTripTF lbl inp = 
+  let (pErr1, pGr1) = case parseNT inp of
+        Right g -> (noError, g)
+        Left  s -> (s, emptyRDFGraph)
+        
+      inp2 = formatGraphAsLazyText pGr1
+      
+      (pErr2, pGr2) = case parseNT inp2 of
+        Right g -> (noError, g)
+        Left  s -> (s, emptyRDFGraph)
+        
+  in TF.testGroup ("roundTrip:" ++ lbl)
+     [ TF.testCase "parsing1" (noError @=? pErr1)
+     , TF.testCase "parsing2" (noError @=? pErr2)
+     , TF.testCase "graph"    (pGr1    @=? pGr2)
+     ]
 
+
 ------------------------------------------------------------
 --  Rather than bother with locating an external file,
 --  include it directly.
@@ -248,23 +271,16 @@
          , checkGraph "graphm1r" graphm1r gm1
          ]
 
-oTests :: Test
-oTests =
-  TestList
-  [ roundTrip "langtag" "<urn:a> <urn:b> \"Foo .\"@en-UK."
-  ]
-  
-allTests :: Test              
+allTests :: [TF.Test]
 allTests = 
-  TestList
-  [ rTests
-  , eTests
-  , gTests
-  , oTests
+  [ conv "r" rTests
+  , conv "e" eTests
+  , conv "g" gTests
+  , roundTripTF "langtag" "<urn:a> <urn:b> \"Foo .\"@en-UK."
   ]
   
 main :: IO ()  
-main = runTestSuite allTests
+main = TF.defaultMain allTests
 
 --------------------------------------------------------------------------------
 --
diff --git a/tests/QNameTest.hs b/tests/QNameTest.hs
--- a/tests/QNameTest.hs
+++ b/tests/QNameTest.hs
@@ -5,7 +5,7 @@
 --------------------------------------------------------------------------------
 -- |
 --  Module      :  QNameTest
---  Copyright   :  (c) 2003, Graham Klyne, 2009 Vasili I Galchin, 2011 Douglas Burke
+--  Copyright   :  (c) 2003, Graham Klyne, 2009 Vasili I Galchin, 2011, 2013 Douglas Burke
 --  License     :  GPL V2
 --
 --  Maintainer  :  Douglas Burke
@@ -19,6 +19,10 @@
 
 module Main where
 
+import qualified Data.Text as T
+
+import qualified Test.Framework as TF
+
 import Swish.Namespace (makeQNameScopedName, getQName, getScopedNameURI)
 import Swish.QName
     ( QName
@@ -31,17 +35,13 @@
     , getLName
     )
 
-import Test.HUnit (Test(TestList))
+import Data.Maybe (fromJust)
 
 import Network.URI (URI, parseURIReference)
-import Data.Maybe (fromJust)
 
-import qualified Data.Text as T
+import Test.HUnit (Test(TestList))
 
-import TestHelpers (runTestSuite
-                    , testCompare
-                    , testCompareEq
-                   )
+import TestHelpers (conv, testCompare, testCompareEq)
 
 ------------------------------------------------------------
 --  Define some common values
@@ -372,33 +372,25 @@
 --  All tests
 ------------------------------------------------------------
 
-allTests :: Test
-allTests = TestList
-  [ testQNameEqSuite
-  , testMakeQNameSuite
-  , testPartQNameSuite
-  , testMaybeQNameEqSuite
-  , testQNameLeSuite
-  , testShowQNameSuite
-  , testSplitURISuite
-  , testSNameTTSuite
+allTests :: [TF.Test]
+allTests = 
+  [ conv "QNameEq" testQNameEqSuite
+  , conv "MakeQName" testMakeQNameSuite
+  , conv "PartQName" testPartQNameSuite
+  , conv "MaybeQNameEq" testMaybeQNameEqSuite
+  , conv "QNameLe" testQNameLeSuite
+  , conv "ShowQName" testShowQNameSuite
+  , conv "SplitURI" testSplitURISuite
+  , conv "SNameTT" testSNameTTSuite
   ]
 
 main :: IO ()
-main = runTestSuite allTests
-
-{-
-runTestFile t = do
-    h <- openFile "a.tmp" WriteMode
-    runTestText (putTextToHandle h False) t
-    hClose h
-tf = runTestFile
-tt = runTestTT
--}
+main = TF.defaultMain allTests
 
 --------------------------------------------------------------------------------
 --
---  Copyright (c) 2003, Graham Klyne, 2009 Vasili I Galchin, 2011 Douglas Burke
+--  Copyright (c) 2003, Graham Klyne, 2009 Vasili I Galchin,
+--      2011, 2013 Douglas Burke
 --  All rights reserved.
 --
 --  This file is part of Swish.
diff --git a/tests/RDFDatatypeXsdIntegerTest.hs b/tests/RDFDatatypeXsdIntegerTest.hs
--- a/tests/RDFDatatypeXsdIntegerTest.hs
+++ b/tests/RDFDatatypeXsdIntegerTest.hs
@@ -5,7 +5,7 @@
 --------------------------------------------------------------------------------
 -- |
 --  Module      :  RDFDatatypeXsdIntegerTest
---  Copyright   :  (c) 2003, Graham Klyne, 2009 Vasili I Galchin, 2011, 2012 Douglas Burke
+--  Copyright   :  (c) 2003, Graham Klyne, 2009 Vasili I Galchin, 2011, 2012, 2013 Douglas Burke
 --  License     :  GPL V2
 --
 --  Maintainer  :  Douglas Burke
@@ -19,6 +19,12 @@
 
 module Main where
 
+import qualified Data.Map as M
+import qualified Data.Text as T
+import qualified Data.Text.Lazy.Builder as B
+
+import qualified Test.Framework as TF
+
 import Swish.Datatype
     ( typeName, typeRules, typeMkRules
     , getTypeAxiom, getTypeRule
@@ -57,16 +63,11 @@
 
 import Network.URI (URI, parseURI)
 
-import qualified Data.Map as M
-import qualified Data.Text as T
-import qualified Data.Text.Lazy.Builder as B
-
 import Test.HUnit
     ( Test(TestCase,TestList)
       , assertFailure
     )
-import TestHelpers (runTestSuite
-                   , testEq, testElem, testEqv, testEqv2)
+import TestHelpers (conv, testEq, testElem, testEqv, testEqv2)
 
 ------------------------------------------------------------
 --  Misc values
@@ -1332,32 +1333,21 @@
 --  All tests
 ------------------------------------------------------------
 
-allTests :: Test
-allTests = TestList
-    [ testDatatypeSuite
-    , testDatatypeValSuite
-    , testVarModifySuite
-    , testDatatypeRuleSuite
-    ]
+allTests :: [TF.Test]
+allTests = 
+  [ conv "Datatype" testDatatypeSuite
+  , conv "DatatypeVal" testDatatypeValSuite
+  , conv "VarModify" testVarModifySuite
+  , conv "DatatypeRule" testDatatypeRuleSuite
+  ]
 
 main :: IO ()
-main = runTestSuite allTests
-
-{-
-trules = runTestTT testDatatypeRuleSuite
-
-runTestFile t = do
-    h <- openFile "a.tmp" WriteMode
-    runTestText (putTextToHandle h False) t
-    hClose h
-tf = runTestFile
-tt = runTestTT
--}
+main = TF.defaultMain allTests
 
 --------------------------------------------------------------------------------
 --
 --  Copyright (c) 2003, Graham Klyne, 2009 Vasili I Galchin,
---    2011, 2012 Douglas Burke
+--    2011, 2012, 2013 Douglas Burke
 --  All rights reserved.
 --
 --  This file is part of Swish.
diff --git a/tests/RDFGraphTest.hs b/tests/RDFGraphTest.hs
--- a/tests/RDFGraphTest.hs
+++ b/tests/RDFGraphTest.hs
@@ -5,7 +5,7 @@
 --------------------------------------------------------------------------------
 -- |
 --  Module      :  RDFGraphTest
---  Copyright   :  (c) 2003, Graham Klyne, 2009 Vasili I Galchin, 2011, 2012 Douglas Burke
+--  Copyright   :  (c) 2003, Graham Klyne, 2009 Vasili I Galchin, 2011, 2012, 2013 Douglas Burke
 --  License     :  GPL V2
 --
 --  Maintainer  :  Douglas Burke
@@ -18,6 +18,15 @@
 
 module Main where
 
+import qualified Data.Map as M
+import qualified Data.Set as S
+import qualified Data.Text as T
+
+-- import qualified Data.Traversable as Traversable
+import qualified Data.Foldable as Foldable
+
+import qualified Test.Framework as TF
+
 import Swish.Namespace (Namespace, makeNamespace, getNamespaceURI, getNamespaceTuple, ScopedName, makeNSScopedName, nullScopedName)
 import Swish.QName (QName, qnameFromURI)
 
@@ -64,20 +73,12 @@
 
 import System.Locale (defaultTimeLocale)
 
-import qualified Data.Map as M
-import qualified Data.Set as S
-import qualified Data.Text as T
-
--- import qualified Data.Traversable as Traversable
-import qualified Data.Foldable as Foldable
-
 import Test.HUnit
     ( Test(TestCase,TestList,TestLabel)
     , Assertion
     , assertBool, assertEqual )
 
-import TestHelpers ( runTestSuite
-                   , testEq
+import TestHelpers ( conv, testEq
                    , testEqv
                    , testCompare
                    , testCompareEq)
@@ -1570,47 +1571,32 @@
 --  All tests
 ------------------------------------------------------------
 
-allTests :: Test
-allTests = TestList
-  [ testLangEqSuite
-  , testConversionSuite
-  , testNodeEqSuite
-  , testNodeClassSuite
-  , testNodeLocalSuite
-  , testNewNodeSuite
-  , testNodeOrdSuite
-  , testLabelOtherSuite
-  , testStmtEqSuite
-  , testGraphEqSuite
-  , testGraphEqSelSuite
-  , testGraphFoldSuite
-  , testGraphFormulaSuite
-  , testGraphTranslateSuite
-  , testMergeSuite
+allTests :: [TF.Test]
+allTests = 
+  [ conv "LangEq" testLangEqSuite
+  , conv "Conversion" testConversionSuite
+  , conv "NodeEq" testNodeEqSuite
+  , conv "NodeClass" testNodeClassSuite
+  , conv "NodeLocal" testNodeLocalSuite
+  , conv "NewNode" testNewNodeSuite
+  , conv "NodeOrd" testNodeOrdSuite
+  , conv "LabelOther" testLabelOtherSuite
+  , conv "StmtEq" testStmtEqSuite
+  , conv "GraphEq" testGraphEqSuite
+  , conv "GraphEqSel" testGraphEqSelSuite
+  , conv "GraphFold" testGraphFoldSuite
+  , conv "GraphFormula" testGraphFormulaSuite
+  , conv "GraphTranslate" testGraphTranslateSuite
+  , conv "Merge" testMergeSuite
   ]
 
 main :: IO ()
-main = runTestSuite allTests
-
-{-
-runTestFile t = do
-    h <- openFile "a.tmp" WriteMode
-    runTestText (putTextToHandle h False) t
-    hClose h
-tf = runTestFile
-tt = runTestTT
-
-geq  = testGraphEqSuite
-nord = testNodeOrdSuite
-gtr  = testGraphTranslateSuite
-
-gmm g1 g2 = grMatchMap g1 g2
--}
+main = TF.defaultMain allTests
 
 --------------------------------------------------------------------------------
 --
 --  Copyright (c) 2003, Graham Klyne, 2009 Vasili I Galchin,
---    2011, 2012 Douglas Burke  
+--    2011, 2012, 2013 Douglas Burke  
 --  All rights reserved.
 --
 --  This file is part of Swish.
diff --git a/tests/RDFProofContextTest.hs b/tests/RDFProofContextTest.hs
--- a/tests/RDFProofContextTest.hs
+++ b/tests/RDFProofContextTest.hs
@@ -5,7 +5,7 @@
 --------------------------------------------------------------------------------
 -- |
 --  Module      :  RDFProofContextTest
---  Copyright   :  (c) 2003, Graham Klyne, 2009 Vasili I Galchin, 2011, 2012 Douglas Burke
+--  Copyright   :  (c) 2003, Graham Klyne, 2009 Vasili I Galchin, 2011, 2012, 2013 Douglas Burke
 --  License     :  GPL V2
 --
 --  Maintainer  :  Douglas Burke
@@ -19,6 +19,12 @@
 
 module Main where
 
+import qualified Data.Map as M
+import qualified Data.Text as T
+import qualified Data.Text.Lazy.Builder as B
+
+import qualified Test.Framework as TF
+
 import Swish.Namespace (Namespace, makeNamespace, ScopedName, makeNSScopedName, namespaceToBuilder)
 import Swish.QName (LName, newLName)
 import Swish.Proof (Step(..), checkProof, checkStep, explainProof)
@@ -53,15 +59,10 @@
 
 import Network.URI (URI, parseURI)
 
-import qualified Data.Map as M
-import qualified Data.Text as T
-import qualified Data.Text.Lazy.Builder as B
-
 import Test.HUnit
     ( Test(TestCase,TestList)
     , assertBool, assertEqual )
-import TestHelpers ( runTestSuite
-                     , test
+import TestHelpers ( conv, test
                      , testEq
                      , testElem
                      )
@@ -652,34 +653,19 @@
 --  and useful expressions for interactive use
 ------------------------------------------------------------
 
-allTests :: Test
-allTests = TestList
-  [ testRules
-  , testRdf
+allTests :: [TF.Test]
+allTests =
+  [ conv "rules" testRules
+  , conv "rdf" testRdf
   ]
 
 main :: IO ()
-main = runTestSuite allTests
-
-{-
-runTestFile t = do
-    h <- openFile "a.tmp" WriteMode
-    runTestText (putTextToHandle h False) t
-    hClose h
-tf = runTestFile
-tt = runTestTT
-
-p10 = runTestTT $ TestList
-    [ rdfAxiom10
-    , rdfRule10
-    , testProof     "rdfProof10" True  rdfProof10
-    ]
--}
+main = TF.defaultMain allTests
 
 --------------------------------------------------------------------------------
 --
 --  Copyright (c) 2003, Graham Klyne, 2009 Vasili I Galchin,
---    2011, 2012 Douglas Burke
+--    2011, 2012, 2013 Douglas Burke
 --  All rights reserved.
 --
 --  This file is part of Swish.
diff --git a/tests/RDFProofTest.hs b/tests/RDFProofTest.hs
--- a/tests/RDFProofTest.hs
+++ b/tests/RDFProofTest.hs
@@ -5,7 +5,7 @@
 --------------------------------------------------------------------------------
 -- |
 --  Module      :  RDFProofTest
---  Copyright   :  (c) 2003, Graham Klyne, 2009 Vasili I Galchin, 2011 Douglas Burke
+--  Copyright   :  (c) 2003, Graham Klyne, 2009 Vasili I Galchin, 2011, 2013 Douglas Burke
 --  License     :  GPL V2
 --
 --  Maintainer  :  Douglas Burke
@@ -19,6 +19,12 @@
 
 module Main where
 
+import qualified Data.Set as S
+import qualified Data.Text as T
+import qualified Data.Text.Lazy.Builder as B
+
+import qualified Test.Framework as TF
+
 import Swish.Namespace (Namespace, makeNamespace, ScopedName, makeNSScopedName)
 import Swish.Rule (Rule(..))
 import Swish.VarBinding (VarBinding(..), VarBindingModify(..))
@@ -45,21 +51,16 @@
     ( Label(..), RDFLabel(..), RDFGraph
     , addGraphs, allLabels, allNodes )
 
-import Test.HUnit ( Test(TestList) )
-
-import Network.URI (URI, parseURI)
-
 import Data.Monoid (Monoid(..))
 import Data.Maybe (fromJust)
 
-import qualified Data.Set as S
-import qualified Data.Text as T
-import qualified Data.Text.Lazy.Builder as B
+import Network.URI (URI, parseURI)
 
-import TestHelpers ( runTestSuite
-                     , test
-                     , testEq, testElem
-                     , testNo
+import Test.HUnit ( Test(TestList) )
+
+import TestHelpers ( conv, test
+                   , testEq, testElem
+                   , testNo
                    )
 
 --  misc helpers
@@ -1029,32 +1030,24 @@
 
 --  Full test suite, main program, and useful expressions for interactive use
 
-allTests :: Test
-allTests = TestList
-  [ test1
-  , test2
-  , test3
-  , test4
-  , test5
-  , test6
-  , test7
+allTests :: [TF.Test]
+allTests =
+  [ conv "1" test1
+  , conv "2" test2
+  , conv "3" test3
+  , conv "4" test4
+  , conv "5" test5
+  , conv "6" test6
+  , conv "7" test7
   ]
 
 main :: IO ()
-main = runTestSuite allTests
-
-{-
-runTestFile t = do
-    h <- openFile "a.tmp" WriteMode
-    runTestText (putTextToHandle h False) t
-    hClose h
-tf = runTestFile
-tt = runTestTT
--}
+main = TF.defaultMain allTests
 
 --------------------------------------------------------------------------------
 --
---  Copyright (c) 2003, Graham Klyne, 2009 Vasili I Galchin, 2011 Douglas Burke  
+--  Copyright (c) 2003, Graham Klyne, 2009 Vasili I Galchin,
+--     2011, 2013 Douglas Burke  
 --  All rights reserved.
 --
 --  This file is part of Swish.
diff --git a/tests/RDFQueryTest.hs b/tests/RDFQueryTest.hs
--- a/tests/RDFQueryTest.hs
+++ b/tests/RDFQueryTest.hs
@@ -5,7 +5,7 @@
 --------------------------------------------------------------------------------
 -- |
 --  Module      :  RDFQueryTest
---  Copyright   :  (c) 2003, Graham Klyne, 2009 Vasili I Galchin, 2011, 2012 Douglas Burke
+--  Copyright   :  (c) 2003, Graham Klyne, 2009 Vasili I Galchin, 2011, 2012, 2013 Douglas Burke
 --  License     :  GPL V2
 --
 --  Maintainer  :  Douglas Burke
@@ -22,6 +22,11 @@
 
 module Main where
 
+import qualified Data.Set as S
+import qualified Data.Text.Lazy.Builder as B
+
+import qualified Test.Framework as TF
+
 import Swish.Namespace (getNamespaceURI, ScopedName, makeScopedName)
 import Swish.VarBinding
     ( VarBinding(..)
@@ -61,12 +66,8 @@
 
 import Network.URI (URI, parseURI)
 
-import qualified Data.Set as S
-import qualified Data.Text.Lazy.Builder as B
-
 import Test.HUnit ( Test(TestList) )
-import TestHelpers (runTestSuite
-                   , test
+import TestHelpers ( conv, test
                    , testEq
                    , testElem
                    , testEqv
@@ -1635,35 +1636,24 @@
 --  and useful expressions for interactive use
 ------------------------------------------------------------
 
-allTests :: Test
-allTests = TestList
-  [ test1
-  , test2
-  , test3
-  , test4
-  , test6
-  , test7
+allTests :: [TF.Test]
+allTests = 
+  [ conv "1" test1
+  , conv "2" test2
+  , conv "3" test3
+  , conv "4" test4
+  , conv "6" test6
+  , conv "7" test7
 --  , test8
   ]
 
 main :: IO ()
-main = runTestSuite allTests
-
-{-
-runTestFile t = do
-    h <- openFile "a.tmp" WriteMode
-    runTestText (putTextToHandle h False) t
-    hClose h
-tf = runTestFile
-tt = runTestTT
-
-shres32 = TestCase $ assertString (show res32)
--}
+main = TF.defaultMain allTests
 
 --------------------------------------------------------------------------------
 --
 --  Copyright (c) 2003, Graham Klyne, 2009 Vasili I Galchin,
---    2011, 2012 Douglas Burke  
+--    2011, 2012, 2013 Douglas Burke  
 --  All rights reserved.
 --
 --  This file is part of Swish.
diff --git a/tests/RDFRulesetTest.hs b/tests/RDFRulesetTest.hs
--- a/tests/RDFRulesetTest.hs
+++ b/tests/RDFRulesetTest.hs
@@ -5,7 +5,7 @@
 --------------------------------------------------------------------------------
 -- |
 --  Module      :  RDFRulesetTest
---  Copyright   :  (c) 2003, Graham Klyne, 2009 Vasili I Galchin, 2011, 2012 Douglas Burke
+--  Copyright   :  (c) 2003, Graham Klyne, 2009 Vasili I Galchin, 2011, 2012, 2013 Douglas Burke
 --  License     :  GPL V2
 --
 --  Maintainer  :  Douglas Burke
@@ -20,6 +20,13 @@
 
 module Main where
 
+import qualified Data.Set as S
+import qualified Data.Text.Lazy.Builder as B
+
+import qualified Test.Framework as TF
+
+import qualified TestHelpers as TH
+
 import Swish.Namespace (Namespace, makeNamespace, getNamespaceTuple, getNamespaceURI, ScopedName, makeScopedName, makeNSScopedName, namespaceToBuilder)
 import Swish.QName (LName)
 import Swish.Rule (Formula(..), Rule(..), fwdCheckInference )
@@ -56,6 +63,11 @@
     
 import Swish.RDF.Vocabulary (namespaceRDF, namespaceRDFS, namespaceOWL, scopeRDF)
 
+import Data.Monoid (Monoid(..))
+import Data.List (sort)
+import Data.Maybe (isJust, fromJust)
+import Data.Text (Text)
+
 import Test.HUnit
     ( Test(TestCase,TestList)
     , assertBool
@@ -63,24 +75,13 @@
 
 import Network.URI (URI, parseURI)
 
-import Data.Monoid (Monoid(..))
-import Data.List (sort)
-import Data.Maybe (isJust, fromJust)
-import Data.Text (Text)
-
-import qualified Data.Set as S
-import qualified Data.Text.Lazy.Builder as B
-
-import TestHelpers (runTestSuite
-                   , test
+import TestHelpers ( conv, test
                    , testLe
                    , testCompare
                    , testCompareEq
                    , testMaker
                    )
 
-import qualified TestHelpers as TH
-
 ------------------------------------------------------------
 --  Test case helpers
 ------------------------------------------------------------
@@ -350,30 +351,21 @@
 --  All tests
 ------------------------------------------------------------
 
-allTests :: Test
-allTests = TestList
-  [ testFormulaSuite
-  , testRuleSuite
-  , testRulesetSuite
-  , testRDFSuite
+allTests :: [TF.Test]
+allTests = 
+  [ conv "Formula" testFormulaSuite
+  , conv "Rule" testRuleSuite
+  , conv "Ruleset" testRulesetSuite
+  , conv "RDF" testRDFSuite
   ]
 
 main :: IO ()
-main = runTestSuite allTests
-
-{-
-runTestFile t = do
-    h <- openFile "a.tmp" WriteMode
-    runTestText (putTextToHandle h False) t
-    hClose h
-tf = runTestFile
-tt = runTestTT
--}
+main = TF.defaultMain allTests
 
 --------------------------------------------------------------------------------
 --
 --  Copyright (c) 2003, Graham Klyne, 2009 Vasili I Galchin,
---    2011, 2012 Douglas Burke
+--    2011, 2012, 2013 Douglas Burke
 --  All rights reserved.
 --
 --  This file is part of Swish.
diff --git a/tests/TestHelpers.hs b/tests/TestHelpers.hs
--- a/tests/TestHelpers.hs
+++ b/tests/TestHelpers.hs
@@ -15,9 +15,11 @@
 --
 --------------------------------------------------------------------------------
 
+-- TODO: move to using test-framework
+
 module TestHelpers
        ( 
-         runTestSuite
+         conv
          , test
          , testCompare, testCompareEq
          , testEq, testNe, testLe, testGe
@@ -29,30 +31,25 @@
          )
        where
 
-import System.Exit (exitSuccess, exitFailure)
+import qualified Data.Set as S
 
-import Test.HUnit (Test(TestCase, TestList)
-                   , runTestTT
-                   , Assertion
-                   , assertBool, assertEqual, assertFailure
-                   )
-import Test.HUnit.Base (Counts(..))
+import qualified Test.Framework as TF
+import qualified Test.Framework.Providers.HUnit as TF
 
 import Control.Monad (unless)
 
 import Data.Maybe (isJust, isNothing, fromJust)
 
-import qualified Data.Set as S
+import Test.HUnit (Test(TestCase, TestList)
+                   , Assertion
+                   , assertBool, assertEqual, assertFailure
+                   )
 
--- | Run the test suite and exit the process with either 
--- @exitSuccess@ or @exitFailure@.
-runTestSuite :: Test -> IO ()
-runTestSuite tests = do
-  Counts ncases ntried nerrors nfailures <- runTestTT tests
-  -- It's not clear whether all these checks are needed but leave in
-  if ntried == ncases && nerrors == nfailures && nerrors == 0
-    then exitSuccess
-    else exitFailure
+-- quick conversion from a set of HUnit tests to
+-- a labelled test-framework group.
+--
+conv :: String -> Test -> TF.Test
+conv lbl = TF.testGroup lbl . TF.hUnitTestToTests
 
 ------------------------------------------------------------
 --  Test case helpers
@@ -76,8 +73,8 @@
     TestCase ( assertEqual (typ++lab) eq (a1==a2) )
 
 testMaker :: (Show b, Eq b) => (a -> b) -> String -> String -> a -> a -> Test
-testMaker conv l1 l2 x y =
-  TestCase (assertEqual (l1 ++ ":" ++ l2) (conv x) (conv y))
+testMaker f l1 l2 x y =
+  TestCase (assertEqual (l1 ++ ":" ++ l2) (f x) (f y))
 
 testEq :: (Eq a, Show a) => String -> a -> a -> Test
 testEq = testCompare "testEq:"
@@ -197,23 +194,6 @@
     , testMaybeEqv  "11" (Just "abc") (Just "bda")
     , testMaybeEqv  "12" Nothing      (Just "bda")
     ]
--}
-
-------------------------------------------------------------
---  All tests
-------------------------------------------------------------
-
-{-
-allSuccessTests = TestList
-    [ testSuccessSuite
-    ]
-
-allFailureTests = TestList
-    [ testFailureSuite
-    ]
-
-mainS = runTestTT allSuccessTests
-mainF = runTestTT allFailureTests
 -}
 
 --------------------------------------------------------------------------------
diff --git a/tests/TurtleTest.hs b/tests/TurtleTest.hs
--- a/tests/TurtleTest.hs
+++ b/tests/TurtleTest.hs
@@ -25,6 +25,9 @@
 import qualified Data.Text as T
 import qualified Data.Text.Lazy as L
 
+import qualified Test.Framework as TF
+import qualified Test.Framework.Providers.HUnit as TF
+
 import Data.Char (chr)
 import Data.Maybe (fromMaybe)
 
@@ -46,9 +49,7 @@
 import Swish.RDF.Vocabulary.RDF (rdfType, rdfFirst, rdfRest, rdfNil, rdfsLabel)
 import Swish.RDF.Vocabulary.XSD (xsdDecimal, xsdDouble, xsdString)
 
-import Test.HUnit (Test(TestCase,TestList), (~=?), (~:), assertFailure)
-
-import TestHelpers (runTestSuite)
+import Test.HUnit (Assertion, (@=?), assertFailure)
 
 triple :: (ToRDFLabel s, ToRDFLabel p, ToRDFLabel o)
           => s -> p -> o -> RDFTriple
@@ -63,11 +64,10 @@
 parseFail ::
   String  -- ^ error from parse
   -> T.Text  -- ^ original Turtle graph
-  -> String     -- ^ label
-  -> Test
-parseFail emsg gr lbl =
-  TestCase $ assertFailure $ concat
-  ["Unable to parse ", lbl, ":\n", emsg, "\n*** Turtle=\n", T.unpack gr]
+  -> Assertion
+parseFail emsg gr =
+  assertFailure $ concat
+  ["Unable to parse:\n", emsg, "\n*** Turtle=\n", T.unpack gr]
   
 -- | Compare a Turtle format graph with its expected
 --   contents. There is also a 'round trip' check, that
@@ -84,7 +84,7 @@
   String         -- ^ label
   -> T.Text      -- ^ Turtle representation
   -> [RDFTriple] -- ^ Corresponding triples
-  -> Test
+  -> TF.Test
 compareExample l t o =
   let expectedGraph = toRDFGraph oset
       egr = toGraph t
@@ -93,28 +93,41 @@
 
       compareTriples =
         case egr of
-          Left e -> parseFail e t $ "example " ++ l
-          Right gr -> lbl ~: expectedGraph ~=? gr
+          Left e -> parseFail e t
+          Right gr -> expectedGraph @=? gr
 
       compareRoundTrip = 
         let ttl = formatGraphAsText expectedGraph
             tgr = toGraph ttl
         in case tgr of
-          Left e -> parseFail e ttl $ "round-trip example " ++ l
-          Right gr -> lbl ~: expectedGraph ~=? gr
+          Left e -> parseFail e ttl
+          Right gr -> expectedGraph @=? gr
          
-        
-  in TestList [ compareTriples
-              , compareRoundTrip
-              ]
-     
-compareGraphs :: String -> T.Text -> T.Text -> Test
+  in TF.testGroup lbl
+     [ TF.testCase "base case" compareTriples
+     , TF.testCase "round-trip example" compareRoundTrip
+     ]
+
+-- | Check that both graphs (in Turtle format) are
+--   the same, once parsed.
+-- 
+compareGraphs :: String -> T.Text -> T.Text -> TF.Test
 compareGraphs l t1 t2 =
-  case (toGraph t1, toGraph t2) of
-    (Left e1, _) -> parseFail e1 t1 $ "graph 1 of " ++ l
-    (_, Left e2) -> parseFail e2 t2 $ "graph 2 of " ++ l
-    (Right gr1, Right gr2) -> ("example: " ++ l) ~: gr1 ~=? gr2
-      
+  let ans = case (toGraph t1, toGraph t2) of
+        (Left e1, _) -> parseFail e1 t1 -- "graph 1 of " ++ l
+        (_, Left e2) -> parseFail e2 t2 -- "graph 2 of " ++ l
+        (Right gr1, Right gr2) -> gr1 @=? gr2
+  in TF.testCase ("example: " ++ l) ans
+
+-- | Check that the list of triples creates the output
+--   graph. It is intended for very-small graphs.
+--
+checkFormat :: String -> [RDFTriple] -> T.Text -> TF.Test
+checkFormat lbl ts egr =
+  let gr = toRDFGraph $ S.fromList ts
+      ogr = formatGraphAsText gr
+  in TF.testCase ("format: " ++ lbl) $ egr @=? ogr
+
 -- *********************************************
 -- Examples from Turtle specification
 -- *********************************************
@@ -623,9 +636,9 @@
 -- Set up test suites
 -- *********************************************
 
-initialTestSuite :: Test
+initialTestSuite :: TF.Test
 initialTestSuite =
-  TestList
+  TF.testGroup "initial"
   [ compareExample "1" example1 result1
   , compareExample "2.4" example2_4 result2_4
   , compareExample "2.5.1" example2_5_1 result2_5_1
@@ -645,12 +658,16 @@
 
 -- Cases to try and improve the test coverage
 
+urnA, urnB :: URI
+urnA = toURI "urn:a"
+urnB =  toURI "urn:b"
+
 trips :: T.Text -> [RDFTriple]
-trips t = [triple (toURI "urn:a") (toURI "urn:b") (Lit t)]
+trips t = [triple urnA urnB (Lit t)]
 
-coverageCases :: Test
+coverageCases :: TF.Test
 coverageCases =
-  TestList
+  TF.testGroup "coverage"
   [ -- This was actually more a problem with output rather than input.
     compareExample "cov1"
     "<urn:a> <urn:b> \"' -D RT @madeupname: \\\"Foo \\u0024 Zone\\\" \\U0000007e:\\\"\\\"\\\"D\" ."
@@ -674,6 +691,11 @@
   , compareExample "cov3-3"
     "<urn:a> <urn:b> \"\"\"\\\"A quoted string.\\\"\\\"\"\"\"."
     (trips "\"A quoted string.\"\"")
+  , compareExample "cov4"
+    "<urn:a> <urn:b> \"3\\\\8\\\\11\" ."
+    (trips "3\\8\\11")
+  , checkFormat "\\f" (trips "A\ffB")
+    "@prefix : <urn:a> .\n<urn:a> <urn:b> \"A\\u000CfB\" .\n"
   ]
 
 -- Extracted from failures seen when using the W3C test suite
@@ -695,24 +717,24 @@
 le1A =
   [ triple (toURI "urn:a") (toURI "urn:b:") (toURI "urn:example/c~d") ]
 
-w3cCases :: Test
+w3cCases :: TF.Test
 w3cCases =
-  TestList
+  TF.testGroup "w3c"
   [ compareExample "lang-tag1" lt1T lt1A
   , compareExample "localEscapes" le1T le1A
   ]
 
 --
 
-allTests :: Test
-allTests = TestList
+allTests :: [TF.Test]
+allTests = 
   [ initialTestSuite
   , coverageCases
   , w3cCases
   ]
 
 main :: IO ()
-main = runTestSuite allTests
+main = TF.defaultMain allTests
 
 --------------------------------------------------------------------------------
 --
diff --git a/tests/VarBindingTest.hs b/tests/VarBindingTest.hs
--- a/tests/VarBindingTest.hs
+++ b/tests/VarBindingTest.hs
@@ -5,7 +5,7 @@
 --------------------------------------------------------------------------------
 -- |
 --  Module      :  VarBindingTest
---  Copyright   :  (c) 2003, Graham Klyne, 2009 Vasili I Galchin, 2011 Douglas Burke
+--  Copyright   :  (c) 2003, Graham Klyne, 2009 Vasili I Galchin, 2011, 2013 Douglas Burke
 --  License     :  GPL V2
 --
 --  Maintainer  :  Douglas Burke
@@ -19,6 +19,10 @@
 
 module Main where
 
+import qualified Data.Set as S
+
+import qualified Test.Framework as TF
+
 import Swish.VarBinding
     ( VarBinding(..)
     , subBinding, nullVarBinding, makeVarBinding
@@ -38,11 +42,8 @@
 import Data.List (union, intersect)
 import Data.Maybe (isJust, isNothing, fromJust)
 
-import qualified Data.Set as S
-
 import Test.HUnit (Test(TestList))
-import TestHelpers (runTestSuite
-                    , test
+import TestHelpers ( conv, test
                     , testEq 
                     , testEqv, testEqv2, testHasEqv, testMaybeEqv
                     , testJust, testNothing  
@@ -781,30 +782,22 @@
 --  All tests
 ------------------------------------------------------------
 
-allTests :: Test
-allTests = TestList
-    [ testVarBindingSuite
-    , testVarModifySuite
-    , testVarComposeSuite
-    , testFindCompSuite
-    , testFilterSuite
-    ]
+allTests :: [TF.Test]
+allTests = 
+  [ conv "VarBinding" testVarBindingSuite
+  , conv "VarModify" testVarModifySuite
+  , conv "VarCompose" testVarComposeSuite
+  , conv "FindComp" testFindCompSuite
+  , conv "Filter" testFilterSuite
+  ]
 
 main :: IO ()
-main = runTestSuite allTests
-
-{-
-runTestFile t = do
-    h <- openFile "a.tmp" WriteMode
-    runTestText (putTextToHandle h False) t
-    hClose h
-tf = runTestFile
-tt = runTestTT
--}
+main = TF.defaultMain allTests
 
 --------------------------------------------------------------------------------
 --
---  Copyright (c) 2003, Graham Klyne, 2009 Vasili I Galchin, 2011 Douglas Burke
+--  Copyright (c) 2003, Graham Klyne, 2009 Vasili I Galchin,
+--      2011, 2013 Douglas Burke
 --  All rights reserved.
 --
 --  This file is part of Swish.
