1{-# OPTIONS -fglasgow-exts #-} 2 3module Strings (tests) where 4 5{- 6 7This test exercices GENERIC read, show, and eq for the company 8datatypes which we use a lot. The output of the program should be 9"True" which means that "gread" reads what "gshow" shows while the 10read term is equal to the original term in terms of "geq". 11 12-} 13 14import Test.Tasty.HUnit 15 16import Data.Generics 17import CompanyDatatypes 18 19tests = (case gread (gshow genCom) of 20 [(x,_)] -> geq genCom x 21 _ -> False) @=? True 22