CPL - Chalmers Publication Library
| Utbildning | Forskning | Styrkeområden | Om Chalmers | In English In English Ej inloggad.

Testing Properties of Generic Functions

Patrik Jansson (Institutionen för data- och informationsteknik (Chalmers) ; Institutionen för data- och informationsteknik, Datavetenskap, Programmeringslogik (Chalmers)) ; Johan Jeuring
LNCS, Proceedings of IFL 2006 Vol. 4449 (2007),
[Konferensbidrag, refereegranskat]

A datatype-generic function is a family of functions indexed by (the structure of) a type. Examples include equality tests, maps and pretty printers. Property based testing tools like QuickCheck and Gast support the definition of properties and test-data generators, and they check if a monomorphic property is satisfied by the test cases. Generic functions satisfy generic properties and this paper discusses specifying and testing such properties. It shows how generic properties and generators can be expressed, and explains three bugs we found and corrected in the Generic Haskell library.

Nyckelord: Random Testing, Generic Programming, Haskell

Denna post skapades 2007-02-25. Senast ändrad 2014-09-02.
CPL Pubid: 26472