{- Author: Wishnu Prasetya Copyright 2010 Wishnu Prasetya The use of this sofware is free under the GNU General Public License (GPL) version 3. -} {- | This module provides a utitlity to translate a test-suite generated by CTy to an HTML report showing the combinations in the suite. -} module CTy.HTMLReport where import Text.Html import CTy.CRule tableBody :: [[Bool]] -> Html tableBody matrix = concatHtml (map mkrow matrix) where mkrow r = tr . concatHtml . map mkcell $ r mkcell True = td (stringToHtml "+") ! [bgcolor green] mkcell False = td (stringToHtml "-") {- tc2HTML :: CTree () [Class ()] -> Html tc2HTML tau t = where classes = reorder tc = f order where f [] = [] f (c:s) = (fromJust . find (\(n,_,_)-> n==c) $ tc) : f s order = map (\(Cat name _)-> name) cats -}