module Tests where


import Text.XML.Light.Input
import XMLParse

testParse :: String -> XMLParser a -> a
testParse s p = case (parseXMLDoc s) of
    Nothing -> error "failed to parse XML"
    (Just el) -> case (evalXMLParser p el) of
        (Left s) -> error s
        (Right a) ->  a
