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:

7.30 score 54 stars 1 packages 61 scripts 591 downloads 35 exports 24 dependencies

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

TargetResultDate
Doc / VignettesOKNov 12 2024
R-4.5-winOKNov 12 2024
R-4.5-linuxOKNov 12 2024
R-4.4-winOKNov 12 2024
R-4.4-macOKNov 12 2024
R-4.3-winOKNov 12 2024
R-4.3-macOKNov 12 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:briocallrclicrayondescdiffobjdigestevaluatefsgluejsonlitelifecyclemagrittrpkgbuildpkgloadpraiseprocessxpsR6rlangrprojroottestthatwaldowithr

Hedgehog - State Machine Testing

Rendered fromstate-machines.Rmdusingknitr::rmarkdownon Nov 12 2024.

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

Hedgehog - Property Testing in R

Rendered fromhedgehog.Rmdusingknitr::rmarkdownon Nov 12 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