{-# OPTIONS -fglasgow-exts #-}
module GShow2 (tests) where
import Test.HUnit
import Data.Generics
import CompanyDatatypes
tests = gshow genCom ~=? output
gshow' :: Data a => a -> String
gshow' t = "("
++ showConstr (toConstr t)
++ concat (gmapQ ((++) " " . gshow') t)
++ ")"
output = "(C ((:) (D \"Research\" (E (P \"Laemmel\" \"Amsterdam\") (S (8000.0))) ((:) (PU (E (P \"Joost\" \"Amsterdam\") (S (1000.0)))) ((:) (PU (E (P \"Marlow\" \"Cambridge\") (S (2000.0)))) ([])))) ((:) (D \"Strategy\" (E (P \"Blair\" \"London\") (S (100000.0))) ([])) ([]))))"