-------------------------------------------------------------------------------- -- $Id: RDFLabelTest.hs,v 1.1 2004/07/01 15:25:36 graham Exp $ -- -- Copyright (c) 2003, G. KLYNE. All rights reserved. -- See end of this file for licence information. -------------------------------------------------------------------------------- -- | -- Module : RDFLabelTest -- Copyright : (c) 2003, Graham Klyne -- License : GPL V2 -- -- Maintainer : Graham Klyne -- Stability : provisional -- Portability : H98 -- -- This module contains test cases for module RDFGraph. -- -------------------------------------------------------------------------------- module RDF.Label.RDFLabelTest where import IO ( Handle, IOMode(WriteMode) , openFile, hClose, hPutStr, hPutStrLn ) import List ( elemIndex ) import Maybe ( fromJust ) import HUnit ( Test(TestCase,TestList,TestLabel) , assertBool, assertEqual, assertString , runTestTT, runTestText, putTextToHandle ) import FunctorM ( FunctorM(..) ) import LookupMap ( LookupMap(..) , mapFind, mapFindMaybe, mapContains ) import ListHelpers ( equiv ) import RDF.Label.LabelClass ( Label(..) , Arc(..), arcSubj, arcPred, arcObj, arc, arcToTriple, arcFromTriple , Selector , hasLabel, arcLabels, arcNodes ) import Namespace ( Namespace(..) , ScopedName(..) , nullScopedName , makeUriScopedName ) import RDF.Label.RDFLabel ( RDFLabel(..) , isLiteral, isUntypedLiteral, isTypedLiteral, isXMLLiteral , isDatatyped, isMemberProp, isUri, isBlank, isQueryVar , getLiteralText, getScopedName, makeBlank , RDFTriple , newNode, newNodes ) import RDF.Label.Vocabulary ( namespaceRDF , namespaceLang, langName, langTag, isLang -- , rdf_type -- , rdf_first, rdf_rest, rdf_nil , rdf_XMLLiteral -- , rdfs_member -- , rdfd_GeneralRestriction -- , rdfd_onProperties, rdfd_constraint, rdfd_maxCardinality -- , owl_sameAs -- , operator_plus, operator_minus, operator_slash, operator_star ) ------------------------------------------------------------ -- Common definitions ------------------------------------------------------------ testEq :: (Eq a, Show a) => String -> a -> a -> Test testEq lab a1 a2 = TestCase ( assertEqual ("testEq:"++lab) a1 a2 ) ------------------------------------------------------------ -- Test language tag comparisons ------------------------------------------------------------ type Lang = Maybe ScopedName lt0 = Nothing lt1 = Just (langName "en") lt2 = Just (langName "EN") lt3 = Just (langName "fr") lt4 = Just (langName "FR") lt5 = Just (langName "en-us") lt6 = Just (langName "en-US") lt7 = Just (langName "EN-us") lt8 = Just (langName "EN-US") langlist = [ ("lt0",lt0), ("lt1",lt1), ("lt2",lt2), ("lt3",lt3), ("lt4",lt4), ("lt5",lt5), ("lt6",lt6), ("lt7",lt7), ("lt8",lt8) ] langeqlist = [ ("lt1","lt2"), ("lt3","lt4"), ("lt5","lt6"), ("lt5","lt7"), ("lt5","lt8"), ("lt6","lt7"), ("lt6","lt8"), ("lt7","lt8") ] testLangEq :: String -> Bool -> Lang -> Lang -> Test testLangEq lab eq l1 l2 = TestCase ( assertEqual ("testLangEq:"++lab) eq (l1==l2) ) testLangEqSuite = TestList [ testLangEq (testLab l1 l2) (testEq l1 l2) t1 t2 | (l1,t1) <- langlist , (l2,t2) <- langlist ] where testLab l1 l2 = l1 ++ "-" ++ l2 testEq l1 l2 = (l1 == l2) || (l1,l2) `elem` langeqlist || (l2,l1) `elem` langeqlist ------------------------------------------------------------ -- Define some common values ------------------------------------------------------------ base1 = Namespace "base1" "http://id.ninebynine.org/wip/2003/test/graph1/node#" base2 = Namespace "base2" "http://id.ninebynine.org/wip/2003/test/graph2/node/" base3 = Namespace "base3" "http://id.ninebynine.org/wip/2003/test/graph3/node" base4 = Namespace "base4" "http://id.ninebynine.org/wip/2003/test/graph3/nodebase" qb1s1 = ScopedName base1 "s1" qb2s2 = ScopedName base2 "s2" qb3s3 = ScopedName base3 "s3" qb3 = ScopedName base3 "" qb3bm = ScopedName base3 "basemore" qb4m = ScopedName base4 "more" s1 = Res qb1s1 :: RDFLabel s2 = Res qb2s2 :: RDFLabel s3 = Res qb3s3 :: RDFLabel s4 = Res qb3 :: RDFLabel s5 = Blank "s5" :: RDFLabel s6 = Res qb3bm :: RDFLabel s7 = Res qb4m :: RDFLabel s8 = Blank "s8" :: RDFLabel qb1st1 = ScopedName base1 "st1" qb2st2 = ScopedName base2 "st2" qb3st3 = ScopedName base3 "st3" st1 = Res qb1st1 :: RDFLabel st2 = Res qb2st2 :: RDFLabel st3 = Res qb3st3 :: RDFLabel bb = Blank "bb" :: RDFLabel bb0 = Blank "bb0" :: RDFLabel b1 = Blank "b1" :: RDFLabel b2 = Blank "b2" :: RDFLabel b3 = Blank "b3" :: RDFLabel b4 = Blank "b4" :: RDFLabel b5 = Blank "b5" :: RDFLabel b6 = Blank "b6" :: RDFLabel b7 = Blank "b7" :: RDFLabel b8 = Blank "b8" :: RDFLabel b9 = Blank "b9" :: RDFLabel b10 = Blank "b10" :: RDFLabel c1 = Blank "c1" :: RDFLabel c2 = Blank "c2" :: RDFLabel c3 = Blank "c3" :: RDFLabel c4 = Blank "c4" :: RDFLabel ba1 = Blank "_1" :: RDFLabel ba2 = Blank "_2" :: RDFLabel ba3 = Blank "_3" :: RDFLabel ba4 = Blank "_4" :: RDFLabel bn3 = Blank "3" :: RDFLabel bn4 = Blank "4" :: RDFLabel bn5 = Blank "5" :: RDFLabel bn6 = Blank "6" :: RDFLabel qb1p1 = ScopedName base1 "p1" qb2p2 = ScopedName base2 "p2" qb3p3 = ScopedName base3 "p3" qb4p4 = ScopedName base3 "p4" qb1o1 = ScopedName base1 "o1" qb2o2 = ScopedName base2 "o2" qb3o3 = ScopedName base3 "o3" p1 = Res qb1p1 :: RDFLabel p2 = Res qb2p2 :: RDFLabel p3 = Res qb3p3 :: RDFLabel p4 = Res qb4p4 :: RDFLabel o1 = Res qb1o1 :: RDFLabel o2 = Res qb2o2 :: RDFLabel o3 = Res qb3o3 :: RDFLabel o4 = Res qb3 :: RDFLabel o5 = Blank "o5" :: RDFLabel o6 = Blank "s5" :: RDFLabel qb1t1 = ScopedName base1 "type1" qb1t2 = ScopedName base1 "type2" l1 = Lit "l1" Nothing :: RDFLabel l2 = Lit "l2" (Just (langName "en")) :: RDFLabel l3 = Lit "l2" (Just (langName "fr")) :: RDFLabel l4 = Lit "l4" (Just qb1t1) :: RDFLabel l5 = Lit "l4" (Just qb1t1) :: RDFLabel -- (Lang "en") l6 = Lit "l4" (Just qb1t1) :: RDFLabel -- (Lang "fr") l7 = Lit "l4" (Just qb1t2) :: RDFLabel l8 = Lit "l4" (Just qb1t2) :: RDFLabel -- (Lang "en") l9 = Lit "l4" (Just qb1t2) :: RDFLabel -- (Lang "fr") l10 = Lit "l10" (Just rdf_XMLLiteral) :: RDFLabel l11 = Lit "l10" (Just rdf_XMLLiteral) :: RDFLabel -- (Lang "en") l12 = Lit "l10" (Just rdf_XMLLiteral) :: RDFLabel -- (Lang "fr") v1 = Var "v1" :: RDFLabel v2 = Var "v2" :: RDFLabel v3 = Var "v3" :: RDFLabel v4 = Var "v4" :: RDFLabel vb3 = Blank "v3" :: RDFLabel vb4 = Blank "v4" :: RDFLabel -- Test cases for isMemberProp qcm1 = ScopedName namespaceRDF "_1" qcm2 = ScopedName namespaceRDF "_234567" qnm1 = ScopedName namespaceRDF "987" qnm2 = ScopedName namespaceRDF "_987a65" cm1 = Res qcm1 :: RDFLabel cm2 = Res qcm2 :: RDFLabel nm1 = Res qnm1 :: RDFLabel nm2 = Res qnm2 :: RDFLabel ------------------------------------------------------------ -- RDFLabel construction and equality tests ------------------------------------------------------------ testLabelEq :: String -> Bool -> RDFLabel -> RDFLabel -> Test testLabelEq lab eq n1 n2 = TestCase ( assertEqual ("testLabelEq:"++lab) eq (n1==n2) ) nodelist = [ ("s1",s1), ("s2",s2), ("s3",s3), ("s4",s4), ("s5",s5) , ("s6",s6), ("s7",s7), ("s8",s8) , ("b1",b1), ("b2",b2), ("b3",b3), ("b4",b4) , ("p1",p1), ("p2",p2), ("p3",p3), ("p4",p4) , ("o1",o1), ("o2",o2), ("o3",o3), ("o4",o4), ("o5",o5) , ("l1",l1), ("l2",l2), ("l3",l3) , ("l4",l4), ("l5",l5), ("l6",l6) , ("l7",l7), ("l8",l8), ("l9",l9) , ("l10",l10), ("l11",l11), ("l12",l12) , ("v1",v1), ("v2",v2) ] nodeeqlist = [ ("s4","o4") , ("s5","o6") , ("s6","s7") , ("l4","l5") , ("l4","l6") , ("l5","l6") , ("l7","l8") , ("l7","l9") , ("l8","l9") , ("l10","l11") , ("l10","l12") , ("l11","l12") ] testNodeEqSuite = TestList [ testLabelEq (testLab l1 l2) (testEq l1 l2) n1 n2 | (l1,n1) <- nodelist , (l2,n2) <- nodelist ] where testLab l1 l2 = l1 ++ "-" ++ l2 testEq l1 l2 = (l1 == l2) || (l1,l2) `elem` nodeeqlist || (l2,l1) `elem` nodeeqlist ------------------------------------------------------------ -- RDFLabel classification tests ------------------------------------------------------------ testClass :: String -> (RDFLabel -> Bool) -> RDFLabel -> Bool -> Test testClass lab clsf nod eq = TestCase ( assertEqual ("testClass:"++lab) eq (clsf nod) ) testClass01 = testClass "testClass01" isUri s1 True testClass02 = testClass "testClass02" isUri s5 False testClass03 = testClass "testClass03" isUri ba1 False testClass04 = testClass "testClass04" isUri l1 False testClass05 = testClass "testClass05" isUri l10 False testClass06 = testClass "testClass06" isUri cm1 True testClass07 = testClass "testClass07" isUri nm1 True testClass08 = testClass "testClass08" isUri v1 False testClass10 = testClass "testClass10" isLiteral s1 False testClass11 = testClass "testClass11" isLiteral s5 False testClass12 = testClass "testClass12" isLiteral ba1 False testClass13 = testClass "testClass13" isLiteral l1 True testClass14 = testClass "testClass14" isLiteral l4 True testClass15 = testClass "testClass15" isLiteral l5 True testClass16 = testClass "testClass16" isLiteral l10 True testClass17 = testClass "testClass17" isLiteral l11 True testClass18 = testClass "testClass18" isLiteral cm1 False testClass19 = testClass "testClass19" isLiteral v1 False testClass20 = testClass "testClass20" isTypedLiteral s1 False testClass21 = testClass "testClass21" isTypedLiteral s5 False testClass22 = testClass "testClass22" isTypedLiteral ba1 False testClass23 = testClass "testClass23" isTypedLiteral l1 False testClass24 = testClass "testClass24" isTypedLiteral l2 False testClass25 = testClass "testClass25" isTypedLiteral l4 True testClass26 = testClass "testClass26" isTypedLiteral l5 True testClass27 = testClass "testClass27" isTypedLiteral l10 True testClass28 = testClass "testClass28" isTypedLiteral l11 True testClass29 = testClass "testClass29" isTypedLiteral v1 False testClass30 = testClass "testClass30" isUntypedLiteral s1 False testClass31 = testClass "testClass31" isUntypedLiteral s5 False testClass32 = testClass "testClass32" isUntypedLiteral ba1 False testClass33 = testClass "testClass33" isUntypedLiteral l1 True testClass34 = testClass "testClass34" isUntypedLiteral l2 True testClass35 = testClass "testClass35" isUntypedLiteral l4 False testClass36 = testClass "testClass36" isUntypedLiteral l5 False testClass37 = testClass "testClass37" isUntypedLiteral l10 False testClass38 = testClass "testClass38" isUntypedLiteral l11 False testClass39 = testClass "testClass39" isUntypedLiteral v1 False testClass40 = testClass "testClass40" isXMLLiteral s1 False testClass41 = testClass "testClass41" isXMLLiteral s5 False testClass42 = testClass "testClass42" isXMLLiteral ba1 False testClass43 = testClass "testClass43" isXMLLiteral l1 False testClass44 = testClass "testClass44" isXMLLiteral l2 False testClass45 = testClass "testClass45" isXMLLiteral l4 False testClass46 = testClass "testClass46" isXMLLiteral l5 False testClass47 = testClass "testClass47" isXMLLiteral l10 True testClass48 = testClass "testClass48" isXMLLiteral l11 True testClass49 = testClass "testClass49" isXMLLiteral v1 False altIsXmlLit = isDatatyped rdf_XMLLiteral testClass50 = testClass "testClass50" altIsXmlLit s1 False testClass51 = testClass "testClass51" altIsXmlLit s5 False testClass52 = testClass "testClass52" altIsXmlLit ba1 False testClass53 = testClass "testClass53" altIsXmlLit l1 False testClass54 = testClass "testClass54" altIsXmlLit l2 False testClass55 = testClass "testClass55" altIsXmlLit l4 False testClass56 = testClass "testClass56" altIsXmlLit l5 False testClass57 = testClass "testClass57" altIsXmlLit l10 True testClass58 = testClass "testClass58" altIsXmlLit l11 True testClass60 = testClass "testClass60" isMemberProp s1 False testClass61 = testClass "testClass61" isMemberProp s5 False testClass62 = testClass "testClass62" isMemberProp ba1 False testClass63 = testClass "testClass63" isMemberProp l1 False testClass64 = testClass "testClass64" isMemberProp l10 False testClass65 = testClass "testClass65" isMemberProp cm1 True testClass66 = testClass "testClass66" isMemberProp cm2 True testClass67 = testClass "testClass67" isMemberProp nm1 False testClass68 = testClass "testClass68" isMemberProp nm2 False testClass70 = testClass "testClass70" isBlank s7 False testClass71 = testClass "testClass71" isBlank s5 True testClass72 = testClass "testClass72" isBlank ba1 True testClass73 = testClass "testClass73" isBlank l1 False testClass74 = testClass "testClass74" isBlank l4 False testClass75 = testClass "testClass75" isBlank l5 False testClass76 = testClass "testClass76" isBlank l10 False testClass77 = testClass "testClass77" isBlank l11 False testClass78 = testClass "testClass78" isBlank cm1 False testClass79 = testClass "testClass79" isBlank v1 False testClass80 = testClass "testClass80" isQueryVar s8 False testClass81 = testClass "testClass81" isQueryVar s5 False testClass82 = testClass "testClass82" isQueryVar ba1 False testClass83 = testClass "testClass83" isQueryVar l1 False testClass84 = testClass "testClass84" isQueryVar l4 False testClass85 = testClass "testClass85" isQueryVar l5 False testClass86 = testClass "testClass86" isQueryVar l10 False testClass87 = testClass "testClass87" isQueryVar l11 False testClass88 = testClass "testClass88" isQueryVar cm1 False testClass89 = testClass "testClass89" isQueryVar v1 True testNodeClassSuite = TestList [ testClass01, testClass02, testClass03, testClass04 , testClass05, testClass06, testClass07, testClass08 , testClass10, testClass11, testClass12, testClass13, testClass14 , testClass15, testClass16, testClass17, testClass18, testClass19 , testClass20, testClass21, testClass22, testClass23, testClass24 , testClass25, testClass26, testClass27, testClass28, testClass29 , testClass30, testClass31, testClass32, testClass33, testClass34 , testClass35, testClass36, testClass37, testClass38, testClass39 , testClass40, testClass41, testClass42, testClass43, testClass44 , testClass45, testClass46, testClass47, testClass48, testClass49 , testClass50, testClass51, testClass52, testClass53, testClass54 , testClass55, testClass56, testClass57, testClass58 , testClass60, testClass61, testClass62, testClass63, testClass64 , testClass65, testClass66, testClass67, testClass68 , testClass70, testClass71, testClass72, testClass73, testClass74 , testClass75, testClass76, testClass77, testClass78, testClass79 , testClass80, testClass81, testClass82, testClass83, testClass84 , testClass85, testClass86, testClass87, testClass88, testClass89 ] ------------------------------------------------------------ -- RDFLabel local part separation and recombination tests ------------------------------------------------------------ testLocalEq :: String -> String -> String -> Test testLocalEq lab l1 l2 = TestCase ( assertEqual ("testLocalEq:"++lab) l1 l2 ) testLocalLabEq :: String -> RDFLabel -> RDFLabel -> Test testLocalLabEq lab l1 l2 = TestCase ( assertEqual ("testLocalEq:"++lab) l1 l2 ) testNodeLocal01 = testLocalEq "01" "b1" (getLocal b1) testNodeLocal02 = testLocalEq "02" "b2" (getLocal b2) testNodeLocal03 = testLocalEq "03" "?v1" (getLocal v1) testNodeLocal04 = testLocalEq "04" "?v2" (getLocal v2) testNodeLocal05 = testLocalLabEq "05" b1 (makeLabel "b1") testNodeLocal06 = testLocalLabEq "06" b2 (makeLabel "b2") testNodeLocal07 = testLocalLabEq "07" v1 (makeLabel "?v1") testNodeLocal08 = testLocalLabEq "08" v2 (makeLabel "?v2") testNodeLocalSuite = TestList [ testNodeLocal01 , testNodeLocal02 , testNodeLocal03 , testNodeLocal04 , testNodeLocal05 , testNodeLocal06 , testNodeLocal07 , testNodeLocal08 ] ------------------------------------------------------------ -- Node generation tests ------------------------------------------------------------ testNodeEq :: String -> RDFLabel -> RDFLabel -> Test testNodeEq lab l1 l2 = TestCase ( assertEqual ("testNodeEq:"++lab) l1 l2 ) tnn01 = (newNode v1 [b1,b3,v1,v2]) tnn02 = (newNode b1 [b1,b3,v1,v2]) tnn03 = (newNodes b1 [b1,b3,v1,v2])!!0 tnn04 = (newNodes b1 [b1,b3,v1,v2])!!1 tnn05 = (newNodes b1 [b1,b3,v1,v2])!!2 tnn06 = (newNodes s1 [b1,b3,v1,v2,tnns3])!!0 tnn07 = (newNodes s1 [b1,b3,v1,v2,tnns3])!!1 tnn08 = (newNodes s1 [b1,b3,v1,v2,tnns3])!!2 tnn09 = (newNodes l1 [b1,b3,v1,v2,tnns3])!!2 tnns1 = Blank "Res_s1" tnns2 = Blank "Res_s2" tnns3 = Blank "Res_s3" tnns4 = Blank "Res_s4" tnnl1 = Blank "Lit_2" testNewNode01 = testNodeEq "testNewNode01" v3 tnn01 testNewNode02 = testNodeEq "testNewNode02" b2 tnn02 testNewNode03 = testNodeEq "testNewNode03" b2 tnn03 testNewNode04 = testNodeEq "testNewNode04" b4 tnn04 testNewNode05 = testNodeEq "testNewNode05" b5 tnn05 testNewNode06 = testNodeEq "testNewNode06" tnns1 tnn06 testNewNode07 = testNodeEq "testNewNode07" tnns2 tnn07 testNewNode08 = testNodeEq "testNewNode08" tnns4 tnn08 testNewNode09 = testNodeEq "testNewNode09" tnnl1 tnn09 testNewNodeSuite = TestList [ testNewNode01 , testNewNode02 , testNewNode03 , testNewNode04 , testNewNode05 , testNewNode06 , testNewNode07 , testNewNode08 , testNewNode09 ] ------------------------------------------------------------ -- RDFLabel ordering tests ------------------------------------------------------------ testLabelOrd :: String -> Ordering -> RDFLabel -> RDFLabel -> Test testLabelOrd lab order n1 n2 = TestCase ( assertEqual ("testLabelOrd:"++lab++"["++(show n1)++","++(show n2)++"]") order (compare n1 n2) ) nodeorder = -- literals [ "l1" , "l11", "l12", "l10" , "l2", "l3" , "l5", "l6", "l4", "l8", "l9", "l7" -- variables , "v1", "v2" -- URIs , "o1", "p1", "s1" , "o2", "p2", "s2" , "s4", "o4", "s6", "s7" , "o3", "p3", "p4", "s3" -- blank nodes , "b1", "b2", "b3", "b4" , "o5", "s5", "s8" ] testNodeOrdSuite = TestList [ testLabelOrd (testLab l1 l2) (testOrd l1 l2) n1 n2 | (l1,n1) <- nodelist , (l2,n2) <- nodelist ] where testLab l1 l2 = l1 ++ "-" ++ l2 testOrd l1 l2 | testEq l1 l2 = EQ | otherwise = compare (fromJust $ elemIndex l1 nodeorder) (fromJust $ elemIndex l2 nodeorder) testEq l1 l2 = (l1 == l2) || (l1,l2) `elem` nodeeqlist || (l2,l1) `elem` nodeeqlist ------------------------------------------------------------ -- Other RDFLabel tests ------------------------------------------------------------ testLabelName01 = testEq "testLabelName01" (getScopedName s1) qb1s1 testLabelName02 = testEq "testLabelName02" (getScopedName b1) nullScopedName testLabelName03 = testEq "testLabelName03" (getScopedName l1) nullScopedName testLabelName04 = testEq "testLabelName04" (getScopedName v1) nullScopedName testLabelOtherSuite = TestList [ testLabelName01, testLabelName02, testLabelName03, testLabelName04 ] ------------------------------------------------------------ -- Statement construction and equality tests ------------------------------------------------------------ testStmtEq :: String -> Bool -> RDFTriple -> RDFTriple -> Test testStmtEq lab eq t1 t2 = TestCase ( assertEqual ("testStmtEq:"++lab) eq (t1==t2) ) slist = [ ("s1",s1), ("s4",s4), ("s5",s5), ("s6",s6), ("s7",s7) ] plist = [ ("p1",p1) ] olist = [ ("o1",o1), ("o4",o4), ("o5",o5), ("l1",l1), ("l4",l4), ("l7",l7), ("l8",l8), ("l10",l10) ] tlist = [ (lab s p o,trp s p o) | s <- slist, p <- plist, o <- olist ] where lab (s,_) (p,_) (o,_) = s++"."++p++"."++o trp (_,s) (_,p) (_,o) = arc s p o stmteqlist = [ ("s6.p1.l1", "s7.p1.l1"), ("s6.p1.l4", "s7.p1.l4"), ("s6.p1.l7", "s7.p1.l7"), ("s6.p1.l7", "s7.p1.l8"), ("s6.p1.l8", "s7.p1.l7"), ("s6.p1.l8", "s7.p1.l8"), ("s6.p1.l10","s7.p1.l10"), ("s6.p1.o1", "s7.p1.o1"), ("s6.p1.o4", "s7.p1.o4"), ("s6.p1.o5", "s7.p1.o5"), ("s1.p1.l7", "s1.p1.l8"), ("s4.p1.l7", "s4.p1.l8"), ("s5.p1.l7", "s5.p1.l8"), ("s6.p1.l7", "s6.p1.l8"), ("s7.p1.l7", "s7.p1.l8") ] testStmtEqSuite = TestList [ testStmtEq (testLab l1 l2) (testEq l1 l2) t1 t2 | (l1,t1) <- tlist , (l2,t2) <- tlist ] where testLab l1 l2 = l1 ++ "-" ++ l2 testEq l1 l2 = (l1 == l2) || (l1,l2) `elem` stmteqlist || (l2,l1) `elem` stmteqlist ------------------------------------------------------------ -- All tests ------------------------------------------------------------ allTests = TestList [ testLangEqSuite , testNodeEqSuite , testNodeClassSuite , testNodeLocalSuite , testNewNodeSuite , testNodeOrdSuite , testLabelOtherSuite , testStmtEqSuite ] main = runTestTT allTests runTestFile t = do h <- openFile "a.tmp" WriteMode runTestText (putTextToHandle h False) t hClose h tf = runTestFile tt = runTestTT -------------------------------------------------------------------------------- -- -- Copyright (c) 2003, G. KLYNE. All rights reserved. -- -- This file is part of Swish. -- -- Swish is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 2 of the License, or -- (at your option) any later version. -- -- Swish is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License -- along with Swish; if not, write to: -- The Free Software Foundation, Inc., -- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -- -------------------------------------------------------------------------------- -- $Source: /file/cvsdev/HaskellRDF/RDF/Label/RDFLabelTest.hs,v $ -- $Author: graham $ -- $Revision: 1.1 $ -- $Log: RDFLabelTest.hs,v $ -- Revision 1.1 2004/07/01 15:25:36 graham -- Moved Lavel and Vocabulary modules to separate directory --