Module Tools.Quick
Looks up quick check predicates in the given modules and tests them.
-
Usage:
-
java -cp fregec.jar frege.tools.Quick [ option ... ] modulespec ...
Options:
-
-v print a line for each predicate that passed
-
-n num run num tests per predicate, default is 100
-
-p pred1,pred2,... only test the given predicates
-
-x pred1,pred2,... do not test the given predicates
-
-l just print the names of the predicates available.
Ways to specify modules:
-
module the module name (e.g. my.great.Module), will be lookup up in the current class path.
-
dir/ A directory path. The directory is searched for class files, and for each class files an attempt is made to load it as if the given directory was in the class path. The directory must be the root of the classes contained therein, otherwise the classes won't get loaded.
-
path-to.jar A jar or zip file is searched for class files, and for each class file found an attempt is made to load it as if the jar was in the class path.
The number of passed/failed tests is reported. If any test failed or other errors occurred, the exit code will be non zero.
The code will try to heat up your CPU by running tests on all available cores. This should be faster on multi-core computers than running the tests sequentially. It makes it feasible to run more tests per predicate.
Imports
Table of Content
-
propName ∷ QName
-
functionality relies on the absolute name of type Gen
-
genName ∷ QName
-
-
data Options
-
Constructors
-
Opt {list ∷ Bool, verbose ∷ Bool, excluded ∷ Bool, detailed ∷ Bool, ntimes ∷ Int, props ∷ [String], global ∷ Global}
-
Member Functions
-
detailed ∷ Options → Bool
-
access field detailed
-
excluded ∷ Options → Bool
-
access field excluded
-
global ∷ Options → Global
-
access field global
-
list ∷ Options → Bool
-
access field list
-
ntimes ∷ Options → Int
-
access field ntimes
-
props ∷ Options → [String]
-
access field props
-
verbose ∷ Options → Bool
-
access field verbose
-
defaultOptions ∷ Options
-
-
data Counter
-
Constructors
-
Counter {passed ∷ Int, failed ∷ Int, aborted ∷ Bool}
-
Member Functions
-
aborted ∷ Counter → Bool
-
access field aborted
-
failed ∷ Counter → Int
-
access field failed
-
passed ∷ Counter → Int
-
access field passed
-
counterMconcat ∷ Property
-
-
testFailed ∷ Counter
-
-
testPassed ∷ Counter
-
-
testAborted ∷ Counter
-
-
unAborted ∷ Counter → Counter
-
-
main ∷ [String] → IO Bool
-
-
myTarget ∷ StIO ()
-
find the target this module was compiled for
-
getOpt ∷ Options → [String] → IO (Options, [String])
-
-
checkThing ∷ Options → String → IO Counter
-
-
checkModule ∷ Options → String → IO Counter
-
-
getProps ∷ String → StIO [String]
-
import a package and extract all toplevel properties
-
checkProps ∷ Options → String → [String] → IO Counter
-
-
toGen ∷ Object → IO Property
native Quick.toGenImpl
-
This does the magic.
We know that the type of the item is Gen Prop on the Frege level. This will be compiled to something that is a TGen in Java terms.
Hence the cast is a no-op, and the native interface will believe our claim that the Lambda is a Property and will allow us to use it just like any other Property.
-
checkField ∷ Options → String → Class a → String → IO Counter
-
-
instance Eq Counter
-
Member Functions
-
!= ∷ Counter → Counter → Bool
infix 7
-
inherited from Eq.!=
-
== ∷ Counter → Counter → Bool
infix 7
-
Function generated for derived instance.
-
hashCode ∷ Counter → Int
-
Function generated for derived instance.
-
instance Monoid Counter
-
Member Functions
-
mappend ∷ Counter → Counter → Counter
infixr 13
-
-
mconcat ∷ [Counter] → Counter
-
inherited from Monoid.mconcat
-
mempty ∷ Counter
-
-
mtimes ∷ Int → Counter → Counter
-
inherited from Monoid.mtimes
-
sconcat ∷ [Counter] → Counter
-
inherited from Semigroup.sconcat
-
stimes ∷ Int → Counter → Counter
-
inherited from Semigroup.stimes
-
String → StIO [String]
-
getProps
-
[String] → IO Bool
-
main
-
[Counter] → Counter
-
Monoid_Counter.sconcat, Monoid_Counter.mconcat
-
Bool → Bool → Bool → Bool → Int → [String] → Global → Options
-
Options.Opt
-
Int → Int → Bool → Counter
-
Counter.Counter
-
Int → Counter → Counter
-
Monoid_Counter.stimes, Monoid_Counter.mtimes
-
Object → IO Property
-
toGen
-
Counter → (Bool→Bool) → Counter
-
Counter.chg$aborted
-
Counter → (Int→Int) → Counter
-
Counter.chg$passed, Counter.chg$failed
-
Counter → Bool → Counter
-
Counter.upd$aborted
-
Counter → Int → Counter
-
Counter.upd$passed, Counter.upd$failed
-
Counter → Counter → Bool
-
Eq_Counter.!=, Eq_Counter.==
-
Counter → Counter → Counter
-
Monoid_Counter.mappend
-
Counter → Bool
-
Counter.aborted
-
Counter → Int
-
Eq_Counter.hashCode, Counter.passed, Counter.failed
-
Counter → Counter
-
unAborted
-
Options → ([String]→[String]) → Options
-
Options.chg$props
-
Options → (Global→Global) → Options
-
Options.chg$global
-
Options → (Bool→Bool) → Options
-
Options.chg$verbose, Options.chg$detailed, Options.chg$excluded, Options.chg$list
-
Options → (Int→Int) → Options
-
Options.chg$ntimes
-
Options → String → [String] → IO Counter
-
checkProps
-
Options → String → IO Counter
-
checkModule, checkThing
-
Options → [String] → IO (Options, [String])
-
getOpt
-
Options → [String] → Options
-
Options.upd$props
-
Options → Global → Options
-
Options.upd$global
-
Options → Bool → Options
-
Options.upd$verbose, Options.upd$list, Options.upd$detailed, Options.upd$excluded
-
Options → Int → Options
-
Options.upd$ntimes
-
Options → [String]
-
Options.props
-
Options → Global
-
Options.global
-
Options → Bool
-
Options.verbose, Options.list, Options.detailed, Options.excluded
-
Options → Int
-
Options.ntimes
-
StIO ()
-
myTarget
-
Property
-
counterMconcat
-
QName
-
genName, propName
-
Counter
-
testAborted, testFailed, testPassed, Monoid_Counter.mempty
-
Options
-
defaultOptions
-
Options → String → Class a → String → IO Counter
-
checkField
-
𝖆 → Bool
-
Counter.has$aborted, Counter.has$failed, Counter.has$passed, Options.has$props, Options.has$list, Options.has$ntimes, Options.has$detailed, Options.has$excluded, Options.has$global, Options.has$verbose