Testing with Axioms in C++ 2011

Anya Helene Bagge, Valentin David and Magne Haveraaen


Anya Helene Bagge, Valentin David and Magne Haveraaen. Testing with Axioms in C++ 2011. Journal of Object Technology, 10:10:1–32. AITO, 2011.


Journal of Object Technology 10:10:1–32, 2011

Paper Links:

[doi] [pdf]


Unit testing is an important part of modern software development, where individual code units are tested in isolation. Such tests are typically case-based, checking a likely error scenario or an error that has previously been identified and fixed. Coming up with good test cases is challenging, particularly when testing generic code, and focusing on individual tests can distract from creating tests that cover the full functionality. Concepts provide a generic way of describing code interfaces for generic code. Together with axioms, program behaviour can be specified algebraically in a formal or semi-formal way. In this paper we show how concepts and axioms can be expressed in standard C++ 2011, and explore how to generate generic unit tests, by treating the axioms as code to be evaluated with test data. We also show a generic way to generate test data for axiom-based testing in C++ 2011.

Related Software:

The Catsfoot Concept Library

Related Project:

Axiom Testing


  title = {Testing with Axioms in {C++~2011}},
  author = {Anya Helene Bagge and Valentin David and Magne Haveraaen},
  year = {2011},
  editor = {Bernd Fischer},
  journal = {Journal of Object Technology},
  volume = {10},
  pages = {10:1--32},
  publisher = {AITO},
  doi = {10.5381/jot.2011.10.1.a10},
  issn = {1660-1769},
  url = {http://www.ii.uib.no/~anya/papers/bagge-david-haveraaen-jot11-testing.html},
  pdf = {http://www.ii.uib.no/~anya/papers/bagge-david-haveraaen-jot11-testing.pdf},


Copyright © 2011 Journal of Object Technology. This work may be freely disributed.