ideas-1.6: Feedback services for intelligent tutoring systems

Maintainerbastiaan.heeren@ou.nl
Stabilityprovisional
Portabilityportable (depends on ghc)
Safe HaskellSafe
LanguageHaskell98

Ideas.Utils.TestSuite

Contents

Description

A lightweight wrapper for organizing tests (including QuickCheck tests). It introduces the notion of a test suite, and it stores the test results for later inspection (e.g., for the generation of a test report). A TestSuite is a monoid.

Synopsis

TestSuite

suite :: String -> [TestSuite] -> TestSuite Source #

Construct a (named) test suite containing test cases and other suites

useProperty :: Testable prop => String -> prop -> TestSuite Source #

Turn a QuickCheck property into the test suite. The first argument is a label for the property

usePropertyWith :: Testable prop => String -> Args -> prop -> TestSuite Source #

Turn a QuickCheck property into the test suite, also providing a test configuration (Args)

assertEquals :: (Eq a, Show a) => String -> a -> a -> TestSuite Source #

onlyWarnings :: TestSuite -> TestSuite Source #

All errors are turned into warnings

Running a test suite

Test Suite Result

Message

Status

class HasStatus a where Source #

Minimal complete definition

getStatus

Methods

getStatus :: a -> Status Source #

isOk :: HasStatus a => a -> Bool Source #

Rating

class HasRating a where Source #

Minimal complete definition

rating, rate

Methods

rating :: a -> Maybe Int Source #

rate :: Int -> a -> a Source #