ideas-1.2: Feedback services for intelligent tutoring systems

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

Ideas.Common.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] -> TestSuiteSource

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

useProperty :: Testable prop => String -> prop -> TestSuiteSource

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

usePropertyWith :: Testable prop => String -> Args -> prop -> TestSuiteSource

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

assertEquals :: (Eq a, Show a) => String -> a -> a -> TestSuiteSource

onlyWarnings :: TestSuite -> TestSuiteSource

All errors are turned into warnings

Running a test suite

Test Suite Result

Message

Status

class HasStatus a whereSource

Methods

getStatus :: a -> StatusSource

Rating

class HasRating a whereSource

Methods

rating :: a -> Maybe IntSource

rate :: Int -> a -> aSource