Package: hedgehog 0.1

Huw Campbell

hedgehog: Property-Based Testing

Hedgehog will eat all your bugs. 'Hedgehog' is a property-based testing package in the spirit of 'QuickCheck'. With 'Hedgehog', one can test properties of their programs against randomly generated input, providing far superior test coverage compared to unit testing. One of the key benefits of 'Hedgehog' is integrated shrinking of counterexamples, which allows one to quickly find the cause of bugs, given salient examples when incorrect behaviour occurs.

Authors:Huw Campbell [aut, cre]

hedgehog_0.1.tar.gz
hedgehog_0.1.zip(r-4.5)hedgehog_0.1.zip(r-4.4)hedgehog_0.1.zip(r-4.3)
hedgehog_0.1.tgz(r-4.4-any)hedgehog_0.1.tgz(r-4.3-any)
hedgehog_0.1.tar.gz(r-4.5-noble)hedgehog_0.1.tar.gz(r-4.4-noble)
hedgehog_0.1.tgz(r-4.4-emscripten)hedgehog_0.1.tgz(r-4.3-emscripten)
hedgehog.pdf |hedgehog.html
hedgehog/json (API)

# Install 'hedgehog' in R:
install.packages('hedgehog', repos = c('https://hedgehogqa.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/hedgehogqa/r-hedgehog/issues

On CRAN:

35 exports 54 stars 3.29 score 31 dependencies 1 dependents 58 scripts 343 downloads

Last updated 3 years agofrom:f396924e40. Checks:OK: 7. Indexed: yes.

TargetResultDate
Doc / VignettesOKSep 13 2024
R-4.5-winOKSep 13 2024
R-4.5-linuxOKSep 13 2024
R-4.4-winOKSep 13 2024
R-4.4-macOKSep 13 2024
R-4.3-winOKSep 13 2024
R-4.3-macOKSep 13 2024

Exports:commanddiscardexpect_sequentialforallgen.actionsgen.and_thengen.betagen.bindgen.cgen.choicegen.dategen.elementgen.examplegen.gammagen.impuregen.intgen.listgen.mapgen.no.shrinkgen.puregen.recursivegen.rungen.samplegen.sample.intgen.shrinkgen.sizedgen.structuregen.subsequencegen.unifgen.withgenerateshrink.halvesshrink.listshrink.removesshrink.towards

Dependencies:briocallrclicrayondescdiffobjdigestevaluatefansifsgluejsonlitelifecyclemagrittrpillarpkgbuildpkgconfigpkgloadpraiseprocessxpsR6rematch2rlangrprojroottestthattibbleutf8vctrswaldowithr

Hedgehog - State Machine Testing

Rendered fromstate-machines.Rmdusingknitr::rmarkdownon Sep 13 2024.

Last update: 2018-08-13
Started: 2017-10-09

Hedgehog - Property Testing in R

Rendered fromhedgehog.Rmdusingknitr::rmarkdownon Sep 13 2024.

Last update: 2018-08-13
Started: 2017-10-09

Readme and manuals

Help Manual

Help pageTopics
State based testing commandscommand
Discard a test casediscard
Execute a state machine modelexpect_sequential
Hedgehog property testforall
Random Sample Generationgen-element gen.choice gen.element gen.int gen.sample gen.sample.int gen.subsequence
Generatorsgen gen-monad gen.and_then gen.bind gen.impure gen.map gen.pure gen.with
Generate a list of possible actions.gen.actions
Generate a float with a gamma distributiongen.beta
Generate a vector of values from a generatorgen.c
Generate a date between the from and to dates specified.gen.date
Sample from a generator.gen.example
Generate a float with a gamma distributiongen.gamma
Generate a list of values, with length bounded by the size parameter.gen.list
Stop a generator from shrinkinggen.no.shrink
Build recursive structures in a way that guarantees termination.gen.recursive
Run a generatorgen.run
Helper to create a generator with a shrink function.gen.shrink
Sized generator creationgen.sized
Generate a structuregen.structure
Generate a float between the from and to the values specified.gen.unif
Compose generatorsgenerate
Property based testing in Rhedgehog
Shrink a number by dividing it into halves.shrink.halves
Shrink a list by edging towards the empty list.shrink.list
Produce permutations of removing num elements from a list.shrink.removes
Shrink an integral number by edging towards a destination.shrink.towards
A symbolic value.symbolic
Lazy rose treestree tree.bind tree.expand tree.liftA2 tree.map tree.sequence tree.unfold tree.unfoldForest
Creating trees of liststree.replicate tree.replicateS