~/talk

Testing in the world of Functional Programming

slides:none on file

Advocates property-based testing with concrete fixes: uses ScalaCheck plus newtypes and the scala-newtype macro so arbitraries generate valid UUIDs/dates instead of random strings and avoid boxing, and uses refined types for positive ints and URLs so generators match function inputs. Models impure interactions via Tagless Final algebras and test interpreters: Const captures call order, State monad simulates external state, and a discountAll example verifies a 20% fixed-discount property by running the state interpreter and comparing folded totals.

AI-written summary · about

  1. 0:00Intro
  2. 0:28Testing in the world of FP
  3. 2:31Property-based testing is awesome
  4. 4:18Property-based testing - Pains
  5. 6:34Newtype it!
  6. 8:57scala-newtype
  7. 13:57Refined-Scalacheck
  8. 19:13Other great libraries
  9. 23:54Testing what we don't control
  10. 26:19How do we use mocking to test 10?
  11. 27:55Tagless Final - How to
  12. 29:03An example
  13. 29:34Using Tagless Final
  14. 31:20A possible Test interpreter
  15. 33:34Running the program
  16. 34:45External world testing continued
  17. 36:52A complex example
  18. 44:41Testing external effects-recap
  19. 45:34Conclusions
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.