Popularity
1.1
Stable
Activity
0.0
Stable
0
1
0
Monthly Downloads: 5
Programming language: Haskell
License: LicenseRef-GPL
Latest version: v0.3.0
testCom alternatives and similar packages
Based on the "test" category.
Alternatively, view testCom alternatives based on common mentions on social networks and blogs.
-
test-framework
Framework for running and organising QuickCheck test properties and HUnit test cases -
test-framework-th
Automagically (using Template Haskell) generates the Haskell-code you need when using HUnit -
test-framework-sandbox
test-sandbox support for the test-framework package -
test-framework-th-prime
Template Haskell for test framework -
test-invariant
Provide common invariants to be checked with QuickCheck -
test-framework-program
A test-framework plugin that will run executables. -
test-framework-leancheck
LeanCheck support for test-framework. -
test-framework-skip
A module for the test-framework system that allows one to mark a test to be skipped.
Clean code begins in your IDE with SonarLint
Up your coding game and discover issues early. SonarLint is a free plugin that helps you find & fix bugs and security issues from the moment you start writing code. Install from your favorite IDE marketplace today.
Promo
www.sonarlint.org
Do you think we are missing an alternative of testCom or a related project?
Popular Comparisons
README
testCom
How to use it
Write your tests
Above a function to test, write your tests like this:
--[1 2] [3]
--O[add 1 2] [3]
--S[[email protected] [email protected]] [[email protected] + [email protected]] [10]
add :: Int -> Int -> Int
add x y = x+y
Syntax
- Without any prefix: [args For The Function] [ExpectedResult]
- With a O (Override) prefix: [custom Function To Test] [ExpectedResult]
- With a S (Specification) prefix: [args Involving [email protected]] [ExpectedResult Maybe Involving [email protected]] [numberOfTestToDo] (for now only basic types are supported: Int Char and Bool). [email protected] MUST be surrounded by spaces.
Run them
For example
{-# LANGUAGE TemplateHaskell #-}
import Language.Haskell.TH
import Language.Haskell.TH.Syntax
import System.Exit
$(makeAllTestsHere)
$(makeAllTests "some/Path/File.hs")
-- Tests
main :: IO ()
main = do
let (str,res) = _TEST_HERE
let (str',res') = _TEST_some_Path_File --The main TEST functions is named with the path with backslash replaced by underscore, and without the file extension.
putStrLn str
putStrLn str'
if res && res' then exitSuccess else exitFailure