| Copyright | (c) 2013 Tom Hawkins & Lee Pike |
|---|---|
| Safe Haskell | None |
| Language | Haskell98 |
Language.Atom.Unit
Description
Unit testing, coverage, reporting & debugging for Atom
Synopsis
Types and Classes
Parameters for a test simulation
Constructors
Fields
- name :: String
Name for test (used in log file, state name, and output)
- cycles :: Int
Number of simulation cycles to run
- testbench :: Atom ()
Atom specification to test
- modules :: [FilePath]
Other C files to build in
- includes :: [FilePath]
Other C headers to include
- declCode :: String
C declarations and definitions inserted prior to the
mainfunction- initCode :: String
C code executed inside the
mainfunction, prior toloopCode- loopCode :: String
C code executed inside the loop running the test
- endCode :: String
C code executed after that loop, but still in
main
Default test parameters
Test Execution
Run a list of tests, output a report on test passes and coverage.
Printing Utilities
printStrLn :: String -> Atom () Source
Print a string in C using printf, appending a newline.
Arguments
Prefix for printed value
Integral value to print
Print an integral value in C using printf.
Arguments
Prefix for printed value
Floating point value to print
Print a floating point value in C using printf.
printProbe :: (String, UE) -> Atom () Source
Print the value of a probe to the console (along with its name).