File: Example.hs

package info (click to toggle)
haskell-feed 1.3.2.1-4
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 816 kB
  • sloc: haskell: 4,735; xml: 4,315; makefile: 2
file content (21 lines) | stat: -rw-r--r-- 577 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
module Example
  ( exampleTests
  ) where

import Prelude.Compat

import Example.CreateAtom (atomFeed)
import Test.Framework (Test, testGroup)
import Test.Framework.Providers.HUnit (testCase)
import Test.HUnit (Assertion)

exampleTests :: Test
exampleTests =
  testGroup "Examples" [testCase "example code to create an atom feed typechecks" typeCheckAtom]

typeCheckAtom :: Assertion
typeCheckAtom =
  case atomFeed of
    Just "" -> error "createAtom returned an empty Text"
    Just _ -> return ()
    Nothing -> error "createAtom returned document with unresolved entities"