This repository includes the source code for the ScalaCheck lesson from my book, Learning Functional Programming in Scala.
Here’s a brief description of the files in this project:
ListUtils
includes two functions that I test in the project:dropAllButFirst
, as shown in the bookdropFirstMatch
, not shown in the book
MathUtils
contains the functionincreaseRandomly
, which is used in the first ScalaCheck lessonDropAllButFirstSpec_IntLists
is the property test class from the second ScalaCheck lesson in the book.DropAllButFirstSpec_PizzaToppings
shows a property test class fordropAllButFirst
that tests against aList[Topping]
. It also shows aGen[List[Topping]]
generator.DropFirstMatchTests
contains a set of ScalaTest unit tests that test the function,dropFirstMatch
IncreaseRandomlySpec
is the property test class that tests theincreaseRandomly
function
Alvin Alexander
http://alvinalexander.com